Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8401443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:48:28+00:00 2026-06-09T21:48:28+00:00

I am not a programmer, but would like to know how the following task

  • 0

I am not a programmer, but would like to know how the following task can be performed. I am working with an experienced developer and would like help from the programming community. If you can guide us or provide as a script, that will be awesome (and thank you ahead of time!)

Here is the scenario:

I have a JAVA application running on Tomcat 7 at Amazon’s cloud EC2 instance (Linux).

I do not want any downtime for the web application (or very little).

What I want is if the web application crashes due to any reason, for it to get auto-restarted immediately as I try to find the cause of the crash.

Please note the scenario that we are trying to deal with: Tomcat is still running, but the web application is down. So you can’t check for Tomcat being down as a parameter to restart the application

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:48:30+00:00Added an answer on June 9, 2026 at 9:48 pm

    I don’t know enough about EC2 to fully answer this (and I only have a few minutes before work) but if it’s running in a scriptable environment and you can setup a cron job, it should be pretty easy.

    1. Have your app serve up a page with some XML or JSON that is parseable. This technique is commonly called a “canary” page — like a canary in the mine (detects gas and dies first kind of deal)
    2. Create a script that accesses the canary page using curl or wget or something. If the response fails (aka your app is down), restart tomcat (or kill tomcat and start it again if it’s still running, which it sounds like it will be)
    3. Set the job to run every minute or so via cron

    Obviously, your best option is to write an app that doesn’t crash 🙂 But in the meantime, that could help and a canary page with some of your app’s configuration info is generally very useful.

    Sorry I don’t have in depth details, but maybe some others could post in on the comments (or I will when I get back from work)

    Also, Tomcat / Java EE offers a ton of bullet proof error handling so it should be rare that your app goes down. Are you sure your developer knows what he’s doing?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is not a programming question but I hope Microsoft programmer can see this
This is probably a simple question, but i would like to know how to
I would like to know how memory can be protected without MMU support. I
I'm not much of a programmer but I want to integrate http://storify.com/ into my
I'm not generally a GUI programmer but as luck has it, I'm stuck building
I'm not a programmer, but I've done all the customizations for my web shop
First, let me say I'm not a professional programmer, but an engineer who had
The following question is not a typical programming question, but IMHO programmers are affected
I am not professional programmer so i can not be sure about this.How many
I'm not a perl programmer but need to debug an error. I'm using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.