0

My client sends 12 requests(nothing could be wrong since they are very similiar) through loop to a Servlet on the server(Tomcat).

When I see the app server access log, I only see 8 of them. I am not sure if the client sent all requests to the server successfully.

Could someone verify that request isn't logged to access_log until the response is available. If this is the case, even all requests reached app server correctly, but four responses are not available.

Is there anyway to find out why do request get lost? Is there any time out issue on the server side? For example, if it takes too long to respond, it drops the request.

By the way, I am running both client and server on my local machine.

Bruno Franco
  • 2,028
  • 11
  • 20
user3123690
  • 1,053
  • 5
  • 17
  • 27

1 Answers1

1

It can't be written until the response is sent, otherwise it can't know what the response code was, but it is also subject to buffering and flushing.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Thanks for your response. You always give great answers. Inside Servelt Get method, I called request.getParameterMap() and to printed out each key and value for parameters each request, but I noticed that it didn't print out four missing requests. Does this mean that missing four request didn't arrive to the Servlet? – user3123690 Sep 17 '14 at 01:33
  • I guess so, unless you had a `RuntimeException` for them. Check your access logs for 500 codes at the relevant times, then check the other Tomcat logs for exceptions at those times. – user207421 Sep 24 '14 at 01:58
  • Your response was very helpful. I ran my client from a remote machine and monitored network traffic using WireShark. The http requests weren't coming from the client. I found issue in the client code and was able to provide a solution. Thanks again. – user3123690 Sep 24 '14 at 02:11