Over the last few years some users have noticed that their servers
suddenly stop responding, and the error log has entries similar to this:

[-conn:965-] Error: return: failed to redirect
'PROPFIND /global/file-not-found.tcl': exceeded recursion limit of 3
[-conn:965-] Error: return: failed to redirect
'PROPFIND /global/server-error.tcl': exceeded recursion limit of 3

The second error.log line then repeats hundreds or thousands of times
until the server stops responding. 

The question is why this happens, and what do these log entries tell
us. 

I think I have found out the answer, but the fix isn't apparent. 

The first error message indicates the recursion limit code is working
correctly, after three tries, the HTTP status code goes from 404 to 500.
The second error message indicates a similar recursion limit is reached
looking for a 500 handler. Unfortunately there is a loop here:

Ns_ConnReturnInternalError 
 executes 
ReturnRedirect
 which executes 
Ns_ConnRedirect
 which executes 
Ns_ConnReturnInternalError

This loop accounts for the remaining error log entries. 

One problem is that ReturnRedirect uses the redirects configured like
this:

ns_section "ns/server/farid/redirects"
ns_param   404 "/fnf-tmpl.tcl"
ns_param   403 "global/forbidden.html"
ns_param   500 "global/server-error.tcl"

What is missing, it seems to me is the method of the request. The method
is used in Ns_AuthorizeRequest and Ns_ConnRunRequest. 

The quick fix is to not configure a 500 redirect. 

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to