There is a unique problem in Sybase EAServer. If you have a servlet defined in your application and you are missing the corresponding Java file for it, the server may hang while being shutdown.
(I know EAServer is now dead-in-the-water, but if you are one of (unfotunate) few to still use it, read on).
We have a web application running inside Sybase EAServer (Jaguar) 5.5. While working on the performance issues in our Web application, I tried to deploy another copy of the application with a profiler code added, so I don’t interfere the main one. While installing this new application, I missed out an external servlet (One to generate Barcodes for our application).
Since it’s a copy of the original app, the Servlet itself was defined in the Web application in EAServer. Only the corresponding Java file was missing. The profiler application seemed to run fine, until… the admin tries to shutdown EAServer. It was hanging….
After some tracing and debugging, found out the following:
EAServer defines the Servlet based on the settings at startup. (It doesn’t seem to check if the actual Servlet file is there or not). When we shutdown the EAServer, it tries to shutdown all the subsystems including the above Servlet. It sends out the shutdown message and decides to wait…forever. Yes, infinitely. This seems to be the default behavior in EAServer.
After some testing, found the following settings that needed to be added"
com.sybase.jaguar.servlet.init.timeout = -1
com.sybase.jaguar.servlet.destroy.wait-time = 30
It’s the destroy wait time that we needed to set. I set it to wait for 30 seconds, and the EAServer shut down like normal!!