On Feb 23, 1:29 am, stevedegrace <degr...@gmail.com> wrote:
> I don't think I'm understanding this very well. By doing some
> inspection, I see that Apache is running under two PIDs, which makes
> sense because ServerLimit right now is set to 2. What I'm wondering
> is, does each of those processes have a persistent instance of Django
> in its own python process waiting for requests, i.e., if I set a
> global variable in a module, do requests that happen to be served by
> the same Apache process have that value set persistently from request
> to request?
>
> I want to start a subprocess to handle some intensive work for me
> making thumbnails, and I want to understand how Django works better in
> order to have a better grasp of what is going on when I do. I don't
> want to inadvertently do something to annoy my hosting company - I'm
> going to try and write this thing so that only one copy of the slave
> process is going at any one time and working away at the tasks one at
> a time. I think I'm going to handle that through a lock file in any
> case, but it still would really help me if someone could clarify what
> happens when a Django 1.0.2 website receives a request, given the
> configuration of running behind Apache 2 via mod_wsgi 2.0 with Python
> 2.5 (not 2.6, curses... I really had my heart set on trying the
> multiprocessing package :)).
For some background on how processes/threads are used in Apache/
mod_wsgi see:
http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
Graham
--~--~---------~--~----~------------~-------~--~----~
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
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---