> Obviously be aware that in daemon mode you will still have multithread > issues to contend with if they run with multiple threads. To avoid it > you would need a config such as: > > ... processes=5 threads=1 > > Ie., use prefork model with mod_wgsi daemon mode. This isn't going to > get you much if anything over running prefork MPM and using embedded > mode though as you still need to have sufficient processes to handle > request. At least with embedded mode Apache will create additional > child processes to meet demand, where as with mod_wsgi daemon mode > that number of processes is fixed. > > Anyway, if you see the same sorts of issues as you did with > mod_python, perhaps bring them up again as maybe can work out where > the multithread issues may be. Thanks for all the help and for wonderful wiki at mod_wsgi site :)
Today I've finished my production setup and my application(s) is now running Apache in MPM Worker mode and mod_wsgi with daemon process. Daemon is set up as: WSGIDaemonProcess procgroup user=usr group=usr processes=2 threads=1 maximum-requests=500 inactivity-timeout=300 stack-size=524288 display- name=%{GROUP} WSGIRestrictStdout Off # some print statements in my app and modules... Memory usage is in general lower than with mod_python :), but it is still rather big in terms of limits on my shared account. Top memory usage I've seen so far was that every process consumed about 55 MB of memory, but there are 5 django applications (5 virtual hosts defined) running under this configuration. I've set this this way that every vitual host uses same process group: WSGIProcessGroup procgroup I've also tried to set same Application group for virtual hosts but this caused my apps to share settings and was unusable. Thanks to inactivity-timeout and maximum-requests settings memory consumptions usually remains at acceptable level, so I consider wsgi setup much better than one with mod_python :) Changing mod_python to wsgi was rather easy for me (great docs). Only problem I had (that took me some time to realize what is happening) was appending pathes to sys.path. At first I used sys.path.append(...) in my .wsgi scripts, which caused strange problems as I had PYTHONPATH set before to some unfortunate value. So at last I used sys.path.insert(0, .....). -- Maciej Wisniowski --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---