I'll make that change.
I'm running stock python for that version of the mac os - 2.7.2. I'll
review the talks.
Thanks very much.
On Wednesday, March 26, 2014 6:32:39 PM UTC-7, Graham Dumpleton wrote:
>
> Try setting:
>
> WSGIApplicationGroup %{GLOBAL}
>
> You are possibly using a Python package with a C extension which doesn't
> work properly in sub interpreters. Due to not being implemented to work
> with thread APIs in sub interpreters properly it has triggered deadlocks in
> your code which has resulted in the number of requests handling requests to
> be exhausted. This causes a request backlog to occur with more Apache child
> worker process being created as the number of requests backs up.
>
>
> http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API
>
> The same backlogging issue can also be caused if your code does call outs
> to external services, or runs commands which can block and those actions
> never complete.
>
> I would suggest having a watch of some of my talks where I do mention back
> logging issues.
>
> http://lanyrd.com/2012/pycon/spcdg/
> http://lanyrd.com/2013/pycon/scdyzk/
> http://lanyrd.com/2012/pycon-au/swkdq/
>
> Also read:
>
>
> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Extracting_Python_Stack_Traces
>
> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Debugging_Crashes_With_GDB
>
> Finally consider use a monitoring system such as New Relic so you can
> actually get data on what your application is actually doing and where
> bottlenecks potentially are.
>
> Graham
>
> On 27/03/2014, at 5:00 AM, Lee Hinde <[email protected] <javascript:>>
> wrote:
>
> I've deployed a django project on a mac running 10.8.x. I started off
> using 'embedded' mode because that's what you do. I switched to daemon mode
> a few day ago. (I think, I've not run the test script yet because it's a
> live site and they're busy.)
>
> Normally apache seems to run with about a dozen processes. I woke up this
> morning and there were over a hundred. That jump occurred over night.
> Nothing in the logs would indicate any reason for that. I.e, there wasn't
> much happening. The error log hasn't had an entry in days.
>
> This is the relevant portion of the httpd.conf file that I used to
> configure daemon mode:
>
>
> WSGIScriptAlias / /Users/mysite/Sites/virtual/mysite/mysite/mysite/wsgi.py
>
> WSGIDaemonProcess registration.mysite.org processes=2 threads=15
> display-name=%{GROUP}
> python-path=/Users/mysite/Sites/virtual/mysite/:/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages
> WSGIProcessGroup registration.mysite.org
>
>
> This is the modwsgi.py file:
>
>
> import os
> import sys
>
> import site
>
> ALLDIRS =
> ['/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages']
> # Remember original sys.path.
> prev_sys_path = list(sys.path)
>
> # Add each new site-packages directory.
> for directory in ALLDIRS:
> site.addsitedir(directory)
>
> # Reorder sys.path so new directories at the front.
> new_sys_path = []
> for item in list(sys.path):
> if item not in prev_sys_path:
> new_sys_path.append(item)
> sys.path.remove(item)
> sys.path[:0] = new_sys_path
>
>
>
> site.addsitedir('/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages')
>
> path = '/Users/mysite/Sites/virtual/mysite/mysite/mysite'
> if path not in sys.path:
> sys.path.append(path)
> sys.path.append('/Users/mysite/Sites/virtual/mysite/mysite/')
> os.environ['PYTHON_EGG_CACHE'] =
> '/Users/mysite/Sites/virtual/mysite/lib/python2.7'
>
> activate_this = '/Users/mysite/Sites/virtual/mysite/bin/activate_this.py'
> execfile(activate_this, dict(__file__=activate_this))
>
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
>
>
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
> I, of course, don't know that modwsgi is a factor, but since I think I'm
> controlling the number of processes with WSGIDaemonProcess, I thought I'd
> ask.
>
>
>
>
>
--
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.