Hello, I have a really weird problem on my hands. I hope this is the right forum to place it in.
Once every so often, the application we're writing just hangs all the sudden. No error messages, but responses are no longer being returned. However all it takes is a CTRL+C on the
Tomcat console window, and everything works again!
After some
testing, I found out that while in this state, some
servlets and
JSP pages return proper responses. More digging found that the difference between the hanging and none-hanging servlets and pages was the presence of System.out.println() calls. If the system is in this "hung" state, any servlet or JSP page that tries to write to the standard output just hangs. The rest return properly.
quick test:
The following test JSP page compiles and runs properly:
as does the following:
but the following JSP page hangs upon execution, no output in either the browser or the Tomcat console:
Furthermore, if there is a syntax error in a JSP, an attempt to access it fails as well, with no response. I am assuming this is because the container tries to write the compile time exception/stacktrace to the standard error stream, and that causes the hang. Attempts to write to the standard out stream from a different application (deployed on the same server) hang as well.
Again, I have absolutely no clue what brings the system to this state, just that when this state is reached any attempts to do System.out.println() hang, and that CTRL+C on the console window exists the state.
I'm using Tomcat 5.0.30, running on Windows 2000 Pro.
Has anyone
ever encountered anything like this? Does anyone have any suggestions?
Thank you,
Yuriy