checking a thread has started
Michael Fuhr
mfuhr at fuhr.org
Sat Nov 6 15:25:07 EST 2004
"Roger Binns" <rogerb at rogerbinns.com> writes:
> Deepak Sarda wrote:
> > I believe this bottleneck is due to Apache server - it just can't
> > spawn so many threads so quickly. It just spawns seven threads and
> > that's it.
>
> Something else to watch out for which bites occassionally is that
> there is an import lock, and only one thread at a time can hold it.
> If a thread in Apache is importing your code, then any of your threads
> that try to do an import will just block. Your main thread will never
> finish and the Apache framework will never finish importing you,
> so the lock is never released.
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.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
More information about the Python-list
mailing list