Sign in to follow this  
AcidZombie24

[web] apache memory error, how can i lower?

Recommended Posts

AcidZombie24    100
mod_python(?) is eating a lot of ram (about 9mb per worker process). If i open several TRAC pages at once many of them will have an error due to no ram (64mb virtual limit). if i limit the worker threads to 3 i can get by alright. Problem is if no one is accessing TRAC i have A LOT of ram being unused. Is there a way i can either 1. Limit the amount of worker process that can use python? 2. Limit the amount of worker process in my trac path? 3. Have apache spawn as many worker process or threads it wants but have it only spawn when X amount or ram is free (or when X amount or below is in use by apache) 4. Something else ? more info: I have a VPS which has 64mb. I have apache, sql, svn, python and trac all installed. Right now on idle my ram usage is 40/62 with 3 apache worker process and the main one up (and 2 SSH connections, one for terminal, another as an explorer so i can edit config files. Thats about 8mb together). The problem is when i open 1 page on TRAC (with SSL) 9/10mb gets sucked up. When i open multiple trac pages sometimes its ok other times i get out of memory error. Why does 1 page take up 9mb? is there a way to lower it? i understand trac is using python but that is still alot. The apache jumps from 7.1 (4.5M) to 23.9% (15.3M). Thats a lot, theres 3 so thats 30M it jumped form loading 3 pages. If i try open a bunch of wordpress a process is 13.0% but if i open a bunch of links (like 25 in seperate tags as fast i can with firefox and the middle mouse button) 2 or 3 pages may say out of memory/ I could lower MaxClients to 2 but i notice phpMyAdmin is slow to load when i do that (also it doesnt explain why wordpress runs out of memory). If i disconnect my 2 ssh clients it probably be enough for TRAC but.... Is there a way to lower uses per worker process? or to have it specifically say there can only be 1 or 2 process using python at a time? i looked in /etc/apache2/mods-enabled in case there was a config and i diddnt see one for python. My current config is below :(
<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       3
    MaxClients            3
    MaxRequestsPerChild   1
</IfModule>

<IfModule mpm_worker_module>
    StartServers          1
    MaxClients            1
    MinSpareThreads       1
    MaxSpareThreads       1
    ThreadsPerChild       1
    MaxRequestsPerChild   1
</IfModule>
for the full config look here http://pastie.org/323220

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this