2009/1/8 julio33 <[email protected]>: > > Hello, i will deactivate the PHP module, i was about to do that > yesterday, but > i forget that, i will disable today. > > This is the apache2 -V command, it seems i use prefork: > > r...@julio33:~# apache2 -V > Server version: Apache/2.2.8 (Ubuntu) > Server built: Jun 25 2008 13:54:43 > Server's Module Magic Number: 20051115:11 > Server loaded: APR 1.2.11, APR-Util 1.2.12 > Compiled using: APR 1.2.11, APR-Util 1.2.12 > Architecture: 64-bit > Server MPM: Prefork > threaded: no > forked: yes (variable process count) > Server compiled with.... > -D APACHE_MPM_DIR="server/mpm/prefork" > -D APR_HAS_SENDFILE > -D APR_HAS_MMAP > -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) > -D APR_USE_SYSVSEM_SERIALIZE > -D APR_USE_PTHREAD_SERIALIZE > -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT > -D APR_HAS_OTHER_CHILD > -D AP_HAVE_RELIABLE_PIPED_LOGS > -D DYNAMIC_MODULE_LIMIT=128 > -D HTTPD_ROOT="" > -D SUEXEC_BIN="/usr/lib/apache2/suexec" > -D DEFAULT_PIDLOG="/var/run/apache2.pid" > -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" > -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock" > -D DEFAULT_ERRORLOG="logs/error_log" > -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" > -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
If you do not need PHP, then move to worker MPM. Doing that will also cut down memory usage as Apache will not create as many worker processes to handle requests. Then ensure you use mod_wsgi daemon mode. Use the defaults for WSGIDaemonProcess, which is 1 process with 15 threads. This is likely going to be more than enough for what you need. If you really want to try and cut down even further on memory, run a separate nginx web server for serving static files. Have that same nginx proxy the dynamic requests through to Apache/mod_wsgi and turn off keep alive in the Apache server. This configuration seems to be a favourite of people using VPS systems as it gives quite a low memory profile as well as other benefits. > If the python raise an error, the wsgi turns slower? or restart or > something?, by other side it´s bad using raise inside modwsgi? No. If the exception is not caught by the WSGI application, then all that will happen is that mod_wsgi will return a HTTP 500 error response indicating an internal server error and log to Apache error log the details of the Python exception that occurred. The process is kept running as there is no need to shut it down and restart when this occurs. BTW, you might find other discussion happening of interest: http://groups.google.com/group/modwsgi/browse_frm/thread/3a9c53dffd6b98e4 Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
