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 136405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:56:35+00:00 2026-05-11T06:56:35+00:00

Today I fixed a bug in an application that might have lead to an

  • 0

Today I fixed a bug in an application that might have lead to an endless loop in a servlet request/response cycle.

So just out of curiousity: What happens, if my servlet actually gets trapped in a for(;;) loop?

Is it somehow possible to recover? Will tomcat detect this? Can this instance be killed without restarting the server?

Or is this one of the worst things that can happen and a very quick way to kill a webcontainer?

EDIT: It was a true endless loop consuming CPU all the time but not memory. I kept it running for a few minutes. I think, I can confirm that tomcat will not detect this kind of thing 🙂

  • 1 1 Answer
  • 2 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. 2026-05-11T06:56:36+00:00Added an answer on May 11, 2026 at 6:56 am

    I don’t think that Tomcat will detect an infinite loop. You might be able to stop the servlet using the Tomcat manager, if the servlet is not consuming all the CPU time with its loop. Otherwise, it’s probably safest and easiest to just restart the server.

    This is why you do extensive tests locally before deploying your apps 😉 and be very careful that all your loops have exit conditions…

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

Sidebar

Related Questions

Today I have encountered a problem that required me to determine the maximum index
I have just started playing with the ASP.Net MVC framework, and today I created
I discovered the source of a really insidious bug today. It's all safely fixed
I've run into a very odd bug today. I have a button on a
I asked a question here earlier today and got that fixed, but now I
I received a ticket today concerning a broken application that was caused by a
Today, after hunting a nasty bug, i tracked down the order of view controllers
Today I discovered that my fresh installation of Apache HTTP Server is able to
I have upgraded F# PowerPack today from 1.9.9.9 to the latest 2.0.0.0 and tried
I was at client site today and made a couple of bug fixes there

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.