On 07/02/2015, at 7:49 AM, Paul Royik <[email protected]> wrote:
> 1. I installed it with pyp2.7 python-memcache. Actually, I don't remember
> whether I installed it last time.
>
> ls -las $HOME/lib/python2.7
>
> 4 drwx------ 21 simamura simamura 4096 Feb 6 16:05 .
> 4 drwx------ 7 simamura simamura 4096 Jan 22 14:35 ..
> 4 drwxrwxr-x 5 simamura simamura 4096 Jan 24 17:05 crispy_forms
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 24 17:05
> django_crispy_forms-1.4.0-py2.7.egg-info
> 4 -rw-rw-r-- 1 simamura simamura 244 Jan 23 17:13 easy-install.pth
> 4 drwxrwxr-x 7 simamura simamura 4096 Jan 26 12:55 guppy
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 26 11:39
> guppy-0.1.10-py2.7.egg-info
> 52 -rw-rw-r-- 1 simamura simamura 52383 Feb 6 16:05 memcache.py
> 48 -rw-rw-r-- 1 simamura simamura 47133 Feb 6 16:05 memcache.pyc
> 4 drwxrwxr-x 7 simamura simamura 4096 Feb 6 11:54 mod_wsgi
> 4 drwxrwxr-x 2 simamura simamura 4096 Feb 6 11:54
> mod_wsgi-4.4.8-py2.7.egg-info
> 4 drwxrwxr-x 2 simamura simamura 4096 Feb 6 11:48
> mod_wsgi_httpd-2.4.12.3-py2.7.egg-info
> 4 drwxrwxr-x 4 simamura simamura 4096 Jan 23 17:13
> numpy-1.8.1-py2.7-linux-x86_64.egg
> 0 -rw------- 1 root root 0 Jan 22 14:35 .ph
> 4 drwxrwxr-x 4 simamura simamura 4096 Jan 23 16:07 pip-6.0.6-py2.7.egg
> 4 drwxrwxr-x 2 simamura simamura 4096 Feb 6 16:05
> python_memcached-1.53-py2.7.egg-info
> 4 drwxrwxr-x 3 simamura simamura 4096 Jan 24 17:05 pytz
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 24 17:05 pytz-2014.10.dist-info
> 4 drwxrwxr-x 3 simamura simamura 4096 Jan 24 17:06 requests
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 24 17:06 requests-2.5.1.dist-info
> 4 drwxrwxr-x 3 simamura simamura 4096 Jan 23 16:08 share
> 4 drwxrwxr-x 37 simamura simamura 4096 Jan 23 16:08 sympy
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 23 16:08
> sympy-0.7.6-py2.7.egg-info
> 12 drwxrwxr-x 2 simamura simamura 12288 Jan 24 17:08 unidecode
> 4 drwxrwxr-x 2 simamura simamura 4096 Jan 24 17:08
> Unidecode-0.04.17-py2.7.egg-info
>
> "I did tell you back in the start to change WSGIDaemonProcess back to not
> create 2 processes. I can't recollect whether you did that or not. " Can you
> tell me where to watch and change it?
>
> Also, I encountered 504 error. Is it natural or something went wrong?
How much traffic does your site actually get and how long do the requests run
for.
In express-config change it to:
mod_wsgi-express setup-server \
--working-directory ${SITE_NAME} \
--server-root express \
--port ${SITE_PORT} \
--log-directory ${LOG_DIR} \
--access-log --access-log-format "${LOG_FORMAT}" \
--access-log-name access_${APPL_NAME}.log \
--error-log-name error_${APPL_NAME}.log \
--python-path ${SITE_ROOT}/lib/python${PYTHON_VERSION} \
--threads 10 \
$SITE_NAME/$SITE_NAME/wsgi.py
That is, add the --threads option with 10. This will increase number of threads
from 5 to 10 and increase WSGI application capacity.
The configuration for the Apache child workers will automatically increase to
accommodate being able to proxy that many.
In short, the 504 means a gateway timeout, which can be due to overloading WSGI
application capacity. I would need to see the actual error message from the
Apache error log to know the scenario which is triggering it.
That the Apache child worker process no longer have a constrained capacity,
requests will queue up in a different spot and so this may arise.
Depending on how long your requests run, we may need to tweak some of the
timeouts.
Knowing the messages from Apache error log will tell me what is going on.
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.