The generated configuration gets overridden each time, you can't edit it if you
want to run changes and still use runmodwsgi.
Use instead:
python manage.py runmodwsgi --processes 10 --threads 1 --max-clients 50
So the processes/threads options controls the daemon process group.
By default the Apache worker process will be given 150% more capacity. If you
need more capacity within the worker processes doing the proxying, to handle
spikes and backlog, you can use max-clients to override the default ratio.
The mod_wsgo script which generates the configuration will use max-clients to
come up with a Apache MPM configuration for the workers based on max-clients.
optparse.make_option('--max-clients', type='int', default=None,
metavar='NUMBER', help='The maximum number of simultaneous '
'client connections that will be accepted. This will default '
'to being 1.5 times the total number of threads in the '
'request thread pools across all process handling requests.'),
Let me know the full set of command options you are using runmodwsgi and can
perhaps comment further on other things to tweak.
Graham
On 22/10/2014, at 7:22 PM, Liam Thompson <[email protected]> wrote:
> Dear Graham
>
> Thank you for the response, and for the pointers of what to look at.
>
> Although I had activated the virtualenv, I had misconfigured it, as it was a
> clone of another repo on the same system, there were cross-configured
> settings. In any event, the versions are the same now.
>
> I am however now getting another error. Upon trying to load the website
> (after running "runmodwsgi" in a virtualenv), I'm getting a "server reached
> MaxRequestWorkers, considering raising...'. I have tried to raise the
> ServerLimit in the base apache config, but it seems to make no difference.
>
> I wasn't sure which option to add into the startup command, or what I have
> misconfigured in my config now.
>
> Any ideas ?
>
> Thanks
> Liam
>
>
>
> On Tuesday, 21 October 2014 23:09:41 UTC+2, Graham Dumpleton wrote:
>
> On 22/10/2014, at 6:57 AM, Liam Thompson <[email protected]> wrote:
>
> > Hi Graham and everyone else
> >
> > I'm running a project on Django 1.6.7, Python 2.6.9, Centos, where I tried
> > to install the latest mod_wsgi in a virtualenv. It seems however that there
> > is some issue, either with the low Python version I'm being forced to use,
> > or something else when I try to use "python manage.py runmodwsgi" to mount
> > the site at the default (localhost:8000)
> >
> > Under 4.3.0 I get the following error when trying to access the page
> >
> > [authz_core:debug] [pid 15107:tid 140184998303488] mod_authz_core.c(828):
> > [client 127.0.0.1:59011] AH01628: authorization result: granted (no
> > directives)
> > [authz_core:debug] [pid 15107:tid 140184998303488] mod_authz_core.c(828):
> > [client 127.0.0.1:59011] AH01628: authorization result: granted (no
> > directives)
> > [wsgi:info] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > mod_wsgi (pid=15106, process='localhost:8000', application=''): Loading
> > WSGI script '/tmp/mod_wsgi-localhost:8000:1000/handler.wsgi'.
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > mod_wsgi (pid=15106): Target WSGI script
> > '/tmp/mod_wsgi-localhost:8000:1000/handler.wsgi' cannot be loaded as Python
> > module.
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > mod_wsgi (pid=15106): Exception occurred processing WSGI script
> > '/tmp/mod_wsgi-localhost:8000:1000/handler.wsgi'.
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > Traceback (most recent call last):
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > File "/tmp/mod_wsgi-localhost:8000:1000/handler.wsgi", line 16, in <module>
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > with_wdb=with_wdb, debug_mode=debug_mode)
> > [wsgi:error] [pid 15106:tid 140184939898624] [remote 127.0.0.1:35673]
> > TypeError: __init__() got an unexpected keyword argument 'mount_point'
> >
> > Whereas if I downgrade to 4.2.5, I can access the page without error
> > (perhaps it has to do with the recent mount_point option added in).
> >
> > I have tried specifying the mount point, but I suspect either I am not
> > doing this correctly, or it is not the problem.
> >
> > I would be most appreciative of any ideas or suggestions, as my searching
> > did not turn up anything useful.
>
>
> The error would suggest the Django manage.py is using one Python installation
> or virtual environment when it is run, but when it in turn then runs
> 'apachectl' in the generated directory to actually start Apache/mod_wsgi that
> it is finding a different Python installation or virtual environment, where
> the latter has an older version of mod_wsgi installed resulting in the
> mismatch.
>
> Thus when using Django management command runmodwsgi, it isn't saving away in
> the generate configuration details of which Python installation or virtual
> environment was used so same is used by mod_wsgi.
>
> Had you actually activated the virtual environment that the Django site used,
> or were you by chance running venv/bin/python explicitly by path against the
> manage.py file? If I can understand how it was being started, may be able to
> work out what issue is.
>
> Only workaround can think of for now is to ensure that mod_wsgi is updated in
> any Python installation or virtual environment it is installed in so they all
> match.
>
> 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.
--
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.