post_action not being run in all cases

Just Marc marc at corky.net
Fri Aug 10 11:37:35 MSD 2007


Hi Igor,

Sorry for bombarding you with lot of little issues.

I have the following scenario where post_action is for some reason not 
being called in all cases.   This scenario runs around several thousand 
times an hour:

1. A request comes in, verified, a session is then added to db - 
session_id passed in header, X-Accel-Redirect is being set
2. A file is sent to the user
3. post_action is used to delete the session using the session_id and do 
some accounting

I noticed after some time that not all sessions were deleted, meaning, 
post_action did not run in all cases.

 From a short look at the ngx_http_finalize_request function, there are 
several cases where post_action might not be called, however, it's hard 
for me to say if these cases can happen.

Marc





More information about the nginx mailing list