From: Greg W. <gr...@mo...> - 2004-03-19 09:06:25
|
Geoff, Cool use of Jetty by the way!!! I should start a cool Jetty project of the month deal and give you billing on the front page or something. I expect the problem could be that many browsers will use more than 1 connection to a server. In fact some old browsers create up to 8 connections to the server. So you need to work out how many connections each set top box may make and then set max threads to be 200*threadsPerBox. You also probably want to increase minThreads from 2. Once there are less thna min threads left, persistent connections are shut down quickly to free resources. So if you had minThreads at 20 preventative action would be taken sooner to stop thread starvation. cheers Greg Kopff wrote: > G'day. > > We embed Jetty (4.2.x) within our application (Cinematheque) to provide us > with a servlet engine. Cinematheque is a VOD management system, and one of > its functions is to serve web pages to IP set top boxes (which run embedded > linux and a customised version of Mozilla). We use Cinematheque in hotels as > part of a digital VOD solution. > > Because this is in a hotel, we know exactly how many clients we are servicing > (in terms of HTTP traffic). Its usually about 200 set top boxes (max). > Because hotel occupancy is usually less than 100%, this number is smaller > still. > > Today, however, Jetty produced these messages and stop responding to requests: > > Audit started: Mon Mar 15 12:29:58 EST 2004 > 12:30:01.014 EVENT Starting Jetty/4.2.x > 12:30:01.083 EVENT Started ServletHttpContext[/] > 12:30:01.086 EVENT Started SocketListener on 0.0.0.0:8080 > 12:30:01.087 EVENT Started org.mortbay.jetty.Server@111a3ac > (--> 2 days later) > 19:45:42.962 EVENT LOW ON THREADS ((256-255+0)<2) on > SocketListener@0.0.0.0:8080 > 19:45:43.426 WARN!! OUT OF THREADS: SocketListener@0.0.0.0:8080 > 19:50:23.508 EVENT LOW ON THREADS ((256-256+1)<2) on > SocketListener@0.0.0.0:8080 > 19:54:15.950 EVENT LOW ON THREADS ((256-256+1)<2) on > SocketListener@0.0.0.0:8080 > (... repeats about 1000 times ...) > > 20:54:40.710 WARN!! No thread for > Socket[addr=/192.168.30.213,port=3997,localport=8080] > 20:54:50.711 WARN!! No thread for > Socket[addr=/192.168.30.200,port=3591,localport=8080] > 20:55:00.713 WARN!! No thread for > Socket[addr=/192.168.30.182,port=3294,localport=8080] > 20:55:10.714 WARN!! No thread for > Socket[addr=/192.168.30.223,port=3893,localport=8080] > (... repeats about 4000 times ...) > > > So, Jetty ran out of threads it seems. But can anyone shed some light on why. > My first thought is that they're not returning to the thread pool for some > reason. Is this even possible? > > As I said, all I use Jetty for is to invoke my servlets (ie, I'm not doing > anything tricky with web apps etc). > > Any pointers would be greatly appreciated. > > Thanks, > > Kindest regards, > |