- What version of the server are you using? - Do you have a stack trace from the core file? - Anything odd in the server log right before the crash (or did you mean it never actually crashes)? - Are you testing a C module you wrote, or some page code? - Are you using mutex locks - maybe you are simply dead locked?
One other thing you could do is to check the connection thread stats - if the endless loop is in your page code, it should be reasonably isolated to the connection threads it was executed in. You can do this from the control port:
server1:nscp 1> join [lsort [ns_info threads]] \n
...
-conn1- -nssock- 103 0 1048543624 connthread {320 10.4.44.252 running
GET /index.adp 2 0}
...The second to last number (2 in this case) is elapsed time in seconds for the request. You should see this number keep increasing for the connection thread in question.
Another technique would be to add simple debug log notices before and after suspect code:
ns_log notice "locking $lock ..." ns_mutex lock $lock ns_log notice "locked $lock ..."
# questionable code here
ns_log notice "unlocking $lock ..." ns_mutex unlock $lock ns_log notice "unlocked $lock ..."
- Nathan
On Monday, March 24, 2003, at 05:07 PM, Zamil Murji wrote:
I was wondering how AOLSERVER deals with an infinite loop.
I have reason to believe that I am getting stuck in an infinite loop and am trying to remedy this. AOLSERVER actually crashes or dies on me. So I wonder if this is a symptom of my infinite loop.
-- AOLserver - http://www.aolserver.com/ To Remove yourself from this list: http://www.aolserver.com/listserv.html List information and options: http://listserv.aol.com/
