To work out if you use prefork or worker, run:
httpd -V
For example:
Server version: Apache/2.2.9 (Unix)
Server built: Sep 19 2008 10:58:54
Server's Module Magic Number: 20051115:15
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
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_FLOCK_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="/usr"
-D SUEXEC_BIN="/usr/bin/suexec"
-D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/private/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
I'll comment more later when know about that.
BTW, are you actually using PHP module? If not you should disable it
in Apache as PHP has a high base level memory usage as its
module/shared library is quite big.
Graham
2009/1/8 julio33 <[email protected]>:
>
>> What WSGI application are you trying to run?
> It´s a very simple app, it´s the background of an ajax application,
> ajax just sent an xmlhttprequest,
> and my app in python search on a Yahoo Api and ask in plaintext, the
> source is about 15 lines
> in python, the python code(of course adapted to the wsgi module) ask
> to yahoo and receive an
> xml extracts some data and send back a response(plain text) usually
> very short.
> i noted that my queries are asked in 320ms to 750ms (ms stands for
> milliseconds), i was informed
> of this on firebug.
>
>> Are you using Apache prefork MPM or worker MPM?
> This is the hard question :) , i review my apache2 configuration and
> says this:
>
> # prefork MPM
> # StartServers: number of server processes to start
> # MinSpareServers: minimum number of server processes which are kept
> spare
> # MaxSpareServers: maximum number of server processes which are kept
> spare
> # MaxClients: maximum number of server processes allowed to start
> # MaxRequestsPerChild: maximum number of requests a server process
> serves
> <IfModule mpm_prefork_module>
> StartServers 5
> MinSpareServers 5
> MaxSpareServers 10
> MaxClients 150
> MaxRequestsPerChild 0
> </IfModule>
>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MaxClients: maximum number of simultaneous client connections
> # MinSpareThreads: minimum number of worker threads which are kept
> spare
> # MaxSpareThreads: maximum number of worker threads which are kept
> spare
> # ThreadsPerChild: constant number of worker threads in each server
> process
> # MaxRequestsPerChild: maximum number of requests a server process
> serves
> <IfModule mpm_worker_module>
> StartServers 2
> MaxClients 150
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadsPerChild 25
> MaxRequestsPerChild 0
> </IfModule>
>
> So i thought i don´t using none of them, i don´t even realize what are
> they, i will read
> by this days about this 2 modules, however i don´t using them
>
> Also as you can see by the always useful ls command:
>
> r...@julio33:/etc/apache2/mods-enabled# ls
> alias.conf authz_default.load autoindex.conf deflate.load
> mime.conf negotiation.conf setenvif.conf
> alias.load authz_groupfile.load autoindex.load dir.conf
> mime.load negotiation.load setenvif.load
> auth_basic.load authz_host.load cgi.load dir.load
> mod-wsgi.conf php5.conf status.conf
> authn_file.load authz_user.load deflate.conf env.load
> mod-wsgi.load php5.load status.load
>
> There are my modules, and yeah i use deflate, maybe that will load the
> thing a bit more.
>
>> Are you trying to use mod_wsgi embedded mode of daemon mode?
> I´m using the default embedded mode, i don´t even try the daemon mode
>
>
>> Are you hosting static content using same web server?
> Yeah, but the static content is small, and as i said it it´s ajax, so
> one time the page loads and that´s all the
> static content, however i plan to maybe in the future separate the
> static content from the wsgi app.
>
>> Posting parts of Apache configuration related to mod_wsgi and WSGI
>> application setup will answer a lot of this.
> The apache and the mod_wsgi were actually the default, i use made what
> this guide:
>
> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
> Exactly said, just a copy paste on my apache configuration
>
> Thanks in advance,
> Julio
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---