I have a compute intensive java servlet in a war webapp running on Apache Tomcat 7 on Ubuntu 14.04 on Amazon EC2. It runs normally, except on requests that take more than 20 seconds to process. In those cases, it seems to hang (no log output of any sort after 20 seconds ) but the connection stays open. Tomcat kills the thread handling the request with an error on shutdown.
It would seem that I am running into some sort of timeout, but I am at a loss to figure out what it is. Longer requests run properly on a local copy of Tomcat, and if I artificially create a slow response by using sleep(), they execute correctly on the server.
I am new to Tomcat, and may be missing something obvious, but I am banging my head against the wall on this one, and would appreciate any help.
Note: It works fine with Jetty. If I can't figure anything else out, I'll just use Jetty in place of Tomcat