• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Error on Firing Large Number of Requests.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have deployed my web service application in two machines. I am doing performance testing using JMeter by firing large number of requests i.e; web service calls (at the rate of 160 requests/ minute). For some of the requests I am getting the following exceptions (Stack trace given below). The issue is more frequent when machine1 redirects the web service call to machine2.

Http11Processor] Error finishing response
java.lang.NullPointerException
at org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:26)
at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Procesor.java:1537)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:962)
at org.apache.coyote.Response.action(Response.java:180)
at org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOututBuffer.java:388)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.jav:906)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.ProcessConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

----------------------------------------------------------------

[Http11BaseProtocol] Error reading request, ignored
java.lang.NullPointerException
at org.apache.tomcat.util.http.MimeHeaders.clear(MimeHeaders.java:129)
at org.apache.coyote.Response.recycle(Response.java:578)
at org.apache.coyote.http11.InternalOutputBuffer.nextRequest(InternalOutputBuffer.java:355)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:929)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

I had a guess that this is an issue with tomcat container's trequest timeout or some stuff similar to that. I tried changing parameters like 'acceptCount', 'socketBuffer', 'maxKeepAliveRequests', 'maxSpareThreads', 'minSpareThreads', 'maxThreads', 'maxHttpHeaderSize' etc. in server.xml file but in vain.

I have also tried to increase the web service timeout period on redirecting from machine1 to machine2 but this also did not help.

Any hints?

All sorts of suggestions are appreciated.

Thanks in Advance,
Aparna
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of Tomcat?
Which version of Java?
Operating System?

How long does a typical request/response cycle take?
Are there database calls involved?

Bill
 
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't consider 3-4 requests a second as being a "high rate", although it is pretty lively compared to a lot of apps.

But this honestly looks like it may be a Tomcat bug where Tomcat isn't initializing its internal resources properly. Unless you can find some other indications of error (localhost lost is always a good bet), you might try a different version of Tomcat.
 
Aparna Rajan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

William Brogden wrote:Which version of Tomcat?
Which version of Java?
Operating System?

How long does a typical request/response cycle take?
Are there database calls involved?

Bill



Java 5, Tomcat 5.5, The application is run in different environments (Windows and UNIX) and the problem persists irrespective of the OS.
A typical request that executes successfully takes 10000-15000 milli seconds to execute but the unsuccessful requests finish in 500-800 milli seconds.
There is no data base call involved but there are file reading operations.

Thanks,
Aparna
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the source code:


I have to agree with Tim, for that line to throw an exception indicates a bug in Tomcat 5.5 which for some unknown reason your code happens to hit. I see that the latest Tomcat5.5 is 5.5.28 - in case yours is earlier.

I cant make any sense out of the MimeHeaders.setValue - line 26 message, line 26 is in the middle of comments, setValue starts at line 264 - it also loops through headers[i] using the "count" looking for a header name. It contains some suspect code that removes a header in the middle of a loop.

The source I am looking at is for 5.5.17

Bill
 
Tim Holloway
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The giveaways are A) a short stack trace (something rarely seen inside Tomcat webapps) and B) absolutely everything in the stack is Apache code.

Even if it was due to a mis-configuration, it would be rude of Tomcat not to give a hint as to the cause of the fault, and the very names of the methods in question tend to imply that it's not failing in a method I'd expect to be configuration-sensitive. It's a "do-er", not a "user".

For General Infomation, Tomcat 5.5.28 was the last of the 5.5 releases. I actually prefer 5.5.26, since they forgot to include something in the .28 release.

However, the jump to Tomcat 6 is fairly small compared to the Tomcat4/Tomcat5 transition, and I've been happily using Tomcat6 for long enough to feel very secure with it..
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic