tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Haroldson <MarkHarold...@msn.com>
Subject Tomcat Concurrency
Date Mon, 15 Jul 2013 22:22:28 GMT
Hello;

 

I am running a tomcat 6 webapp using Jersey and I am running into a
concurrency issue. When there are multiple concurrent connections to tomcat
only one or two are processed concurrently. I have increased the maxThreads
on the connector and now can see the requests being processed  by different
threads however I still on observe one or two threads running concurrently.

 

Example:

Given the following servlet;

 

Servlet()

{

Output("Start thread");

Thread.sleep(20000);

Output("End thread")

}

 

I would expect the following output

 

Start Thread

Start Thread

Start Thread

Start Thread

End Thread

End Thread

End Thread

End Thread

 

Instead I see

Start Thread

Start Thread

End Thread

End Thread

Start Thread

End Thread

Start Thread

End Thread

 

What are the factors that control thread concurrency in Tomcat? Has anyone
seen behavior like this before? Should I expect a high number of concurrent
threads or does java/tomcat gate access to the servlet?

 

Thanks in advance

Mark

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message