views:

15

answers:

1

I have an OSQA (python / django q&a application) installation serving 8 different sites. The sites are all in development, receiving minimal traffic. The server is a virtual private server with 512 mb of ram.

Apache is only serving dynamic pages with mod_wsgi behind Nginx. I can't stop Apache consuming more and more memory with each request until the server chokes.

I experimented with the configuration parameters without much luck to minimize the memory footprint. With the following mpm_prefork parameters in apache2.conf:

StartServers          2
MinSpareServers       1
MaxSpareServers       4
MaxClients            4
MaxRequestsPerChild 100

2 apache processes start using 4 mb and after the first request there are 4 processes with each nearly 50 mb and with each new request those 4 processes climb steadily up to nearly 200 mb each.

I feel like there is something wrong going on. Any suggestions are greatly appreciated.