On 30/11/2014, at 5:59 PM, Steve M <[email protected]> wrote:
> Hello, the problem I am having is that mod_wsgi fails if I set process to
> anything greater than 1 in the WSGIDaemonProcess process=1
>
> This is my current setup:
> [notice] Apache/2.2.14 (Ubuntu) mod_wsgi/4.4.1 Python/2.7.6 configured --
> resuming normal operations
>
> I compiled mod_wsgi from source.
>
> This seems to be the key error, but I am guessing:
> [alert] (11)Resource temporarily unavailable: mod_wsgi (pid=1287): Couldn't
> create worker thread 9 in daemon process 'server_site_a'.
> Several of those pop up in the error log.
>
> WSGI settings in virtualhost:
> WSGIDaemonProcess server_site_a processes=1 threads=10
> display-name=%{GROUP}
> WSGIProcessGroup server_site_a
> WSGIApplicationGroup %{GLOBAL}
>
>
> In main apache2.conf:
> WSGIRestrictedEmbedded On
>
> And mpm_worker_module settings:
>
> StartServers 10
> MaxClients 15
> MaxRequestsPerChild 256
>
> MinSpareThreads 10
> MaxSpareThreads 20
> ThreadsPerChild 15
> ServerLimit 80
>
> MaxMemFree 512
>
>
> After watching Grahams videos on making apache suck less for python I took
> some of his advice
> and decided to start fiddling with the apache settings.
> I first started off by getting apache to come up without errors using
> mpm_worker.
> Once I had a baseline for apache I started to fiddle with mod_wsgi.
> So that is how I arrived at the settings.
>
> Would appreciate any help.
Manual page entry for pthread_create() says:
ERRORS
pthread_create() will fail if:
[EAGAIN] The system lacked the necessary resources to create
another thread, or the system-imposed limit on the
total number of threads in a process
[PTHREAD_THREADS_MAX] would be exceeded.
This would therefore tend to indicate it is an issue with the limits on the
user Apache ends up running as, or the system as a whole.
Can you start by putting back to a working configuration and then in a WSGI
hello world add:
import os
os.system('ulimit -a')
and hit the URL for the hello world script.
Then get from the log file what that produces.
BTW, appreciate that you are at least trying to make changes as many these days
just give and stop using mod_wsgi. :-(
If we can sort out what the restriction is, I'll point out a few things which
still need fixing in what you quote.
Graham
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.