checking a thread has started
Deepak Sarda
deepak.sarda at gmail.com
Sat Nov 6 21:20:00 EST 2004
On 6 Nov 2004 13:25:07 -0700, Michael Fuhr <mfuhr at fuhr.org> wrote:
> What platform is Apache running on? Is the script running under
> mod_python or some other framework? The original post mentioned CGI,
> which traditionally means a separate process, at least on Unix-like
> systems. If the script is running in a separate process from the web
> server, then Apache wouldn't be responsible for creating the threads
> and it shouldn't be holding any import locks.
>
The server is on Redhat with a custom 2.4.20 kernel. The script is not
running through mod_python - just a regular #!/usr/bin/python2.2
I see what you mean and it's true that the script actually runs as a
local user. But there is certainly a relation between the server and
the threads because in httpd.conf - there's a directive which says:
StartServers 8
which means there are 8 idle server instances running at any given
time. Now I assume my main script call take up one instance. Then
when new threads are requested - each thread takes up an instance so
we have 7 new threads. Which is exactly what happens!
The program _always_ successfully creates and completes execution of
exactly seven new threads leaving the remaining eight requested
threads in no man's land!
So there must be some relation between apache and the script. Also, as
I said earlier, when run through a shell as the same user - the script
works perfectly fine.
Deepak
More information about the Python-list
mailing list