Limiting connections to Tomcat

Posted on 2003-03-13
Medium Priority
Last Modified: 2011-10-03
Hi All,

I am using Tomcat 4.1.x and would like to provide a customized page error to the users when some thread/connection limit is reached. Now we are setting minProcessors="50" maxProcessors="375" acceptCount="10" on server.xml but can´t find a way to configure this error page.

I found mod_vhost_limit for Apache but again could not find how to configure this error page.

Any ideas?


Eduardo Rebouças
McFox Software Design
Question by:ereboucas
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

djochim earned 1000 total points
ID: 8172580
First in tomcat's server.xml for your context there is a manager tag.  There you can set an attribute for maxActiveSessions.  When the maxActiveSessions is reached Tomcat throws and IllegalStateException.  Then I put in the web.xml of my webapp an <error-page> tag which catches the IllegalStateException and goes to a particular HTML.
Also a note you should use and HTML page or JSP with the session disabled.  When I first tried with a JSP it threw the IllegalStateException again and I didn't know what was happening but I guess JSP by default ask for the session.
Hope that helps, if I need to explain something better tell me.

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 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