I have a question in regards to page timeouts and how the initial

request is terminated.

First, I apologize up front for my ignorance. I am not a php user,

rather a database developer who has customers using php.

I've noticed if a query takes longer than the default 30 seconds to

execute, php returns a timeout message to the user. From what I can

tell, php uses the SIGPROF signal to stop execution when the 30 seconds

has expired. Also, I've found that it doesn't seem to "unwind" the stack

after receiving the SIGPROF signal, instead it just seems to stop dead

in its tracks and the apache process goes back to listening for another


Is my understanding somewhat correct? If so, how do I, as a library

developer, verify that some/all of my state information is returned back

to a usable state after I've been interrupted right in the middle of a


I've included a pseudo-code example of my problem below, in case it

clarifies what I'm trying to say.


J.D. Mullin

Advantage Database Server

Consider the following function:

void func( void )


1 - set some state flag to 1

2 - call server to do query execution

3 - set some state flag back to 0


The php timeout occurs during step 2.

The zend_timeout handler is called.

?? I don't know what happens next, but control never returns to my

function, so the state flag never gets set back to 0 ??

The same apache process continues to accept requests, although the libraries
that were interrupted are now in an unknown state.

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to