This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Exception in tomcat. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Exception in tomcat." Watch "Exception in tomcat." New topic
Author

Exception in tomcat.

Venkatraman Kandaswamy
Ranch Hand

Joined: Jul 07, 2004
Posts: 120
I have this survey application which I have tested thoroughly and now its open for public. Some 5000 participants are hitting the server right now and I am getting random exceptions. I have also increased the maxThread value to 1000 from the default 150. But still the exceptions keep coming. Also this application uses mysql which allows 100 connections. If I increase the mysql connections will it be of any help? It will be great if anyone can give me some tips on how to manage this.

Here is the tomcat status and error log :

Max threads: 1000 Min spare threads: 80 Max spare threads: 150 Current thread count: 80 Current thread busy: 4
Max processing time: 75089 ms Processing time: 1479 s Request count: 415 Error count: 164 Bytes received: 4.09 MB Bytes sent: 19.28 MB



Thanks a lot.


--Venkatraman<br />SCJP 1.4<br /><a href="http://kvrlogs.blogspot.com" target="_blank" rel="nofollow">blog</a>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5


If this was my problem I would code checks for null before line 145 for every reference in that line of code.
Bill
Venkatraman Kandaswamy
Ranch Hand

Joined: Jul 07, 2004
Posts: 120
Thanks Bill for the reply.

I made sure there was no null pointer in my code. I am sure about that. Here is the line where the exception is occuring.



The persist happens fine and after that its trying to pull the next page in survey - and the exception happens. I am thinking of wrapping this with an try catch block, then if exception happens wait for a couple of seconds and then again try doing the forward. This is the first time I am seeing this big a load.

Also the server its hosted is a Mac OS 10.2 server. Does it have any limitations on the number of active connections?? I remember reading somwhere that Windows XP allows only 10 simultaneous connections?

Thanks for any inputs.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
I guarantee you that if a NullPointerException is thrown, there is a reference with a null value. Assuming that you are in doGet with typical use of "request" and "response" and that the line throwing the exception is correctly identified, then view = null;

The limit on TCP/IP connections either by the operating system or the Tomcat configuration would appear as either a refused connection, "unable to connect to" or similar message to the clien.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in tomcat.
 
Similar Threads
c:forEach Exception
servlet error building
Kindly help with the "cannot connect to the database" error
Code error
Validator with Struts Problem ?