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

 

Reply via email to