In apache + tomcat env, what does the user see if a tomcat thread dies

Posted on 2005-05-10
Last Modified: 2011-10-03
I am running Apache 2.0.44 with Tomcat 4.1.24 connected by mod_jk with multiple tomcat instances.

My question is, if a tomcat thread dies (say due to an out of memory error), what will the end user's experience of this be?

Will they recieve an error page?  Will the request simply not happen (ie they click on a button and nothing happens)? or will apache notice the lack of response from tomcat and pass the request off to another thread?

Question by:sharonfrench
    LVL 19

    Expert Comment

    If tomcat server dies (or apache httpd server couldn't connect to it) then user will get "Service Temporarily Unavailable" error. (HTTP return code 503).
    If you want change default response then you can some html page using
    ErrorDocument 503 some_error_page_for_error_503.htm

    Author Comment

    I'm actually interested in finding out what will happen if one of the tomcat processor threads dies.

    So apache gets a request, forwards it on to tomcat and the tomcat processor thread handling that request dies (with an OutOfMemoryError or some such).

    What sort of response (if any) does apache get from tomcat, and what happens next?  Does apache realize that there was a problem and resubmit the request to tomcat, or does it return 503 to the client? Or...
    LVL 19

    Expert Comment

    if there is a tcp connection to tomcat alive then response will be returned by Tomcat server. And by default it will be an error stacktrace
    LVL 19

    Accepted Solution

    if you don't want to return stacktrace to client you can add custom error pages response in web.xml file of your web application:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now