tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Gokey <>
Subject Re: Error ajp13_process_callback - write failed
Date Fri, 09 Nov 2001 02:44:19 GMT
lsof is invaluable tool!  Thank you for sharing this with me.  I watch 
the number of unclosed files grow asI time went on and was able to 
pinpoint exactly what files needed to be closed.  throughout the day, I 
noticed it climbed to near 1000 and it probably was on its way to 
crashing again since I believe the limit is 1024 (although that is 
configurable.)  I went through my code carefull and now things seem 
pretty stable,it doesn't grow past 27 fds now.  I guess Java isn't like 
other cgi programs where the interpeter comes up, executes your code, 
and shuts down., since the VM is also up, great care must be taken to 
make sure all streams are closed.

Thanks again...  Time will tell for sure, but I think that was the 
reason for this error.


GOMEZ Henri wrote:

>>This time Tomcat crashed, I received some errors...  Is it possible to 
>>receive this kind of error in mod_jk.log if Tomcat can't open up any 
>>more files?
>>>>>[Mon Nov 05 06:41:41 2001]  [jk_ajp13_worker.c (381)]: Error
>>>>>ajp13_process_callback - write failed
>>>>>[Mon Nov 05 06:41:58 2001]  [jk_ajp13_worker.c (381)]: Error
>>>>>ajp13_process_callback - write failed
>>>>>[Mon Nov 05 07:19:23 2001]  [jk_ajp13_worker.c (381)]: Error
>>>>>ajp13_process_callback - write failed
>>Tomcat would just hang and not serve any more requests.  I couldn't 
>>connect to it directly either via port 8080.
>>Looking through the logs, this time I noticed I'm getting "too many 
>>files open" error in my application, so I carefully went through and 
>>found some instances where files where being opened but not 
>>closed.  How 
>>does Java work, if you exit a method will it automatically close the 
>>file, or does it wait for the garbage collector to do this?  I found 
>>some instances where some servlets didn't explicitly close the 
>> from the HttpServletResponse class.
>>I suppose maybe my application is eating up all the available file 
>>pointers in memory and tomcat just hung trying to open a file? 
>>Is this 
>>a plausible theory?
> Good point !!!!
> On Linux, everything is file descriptor, sockets, file, pipe.
> And there is a limit by user process, so the problem could 
> be that one. You could use lsof to know how many descriptor
> are in used for that application (tomcat + webapp) :)
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message