[Simpleweb-Support] Re: Simple stops serving
Brought to you by:
niallg
From: Heikki U. <hu...@al...> - 2006-02-09 12:23:01
|
> > > This will show your fd soft limit, which I expect is > 1024. My guess is that if you expect to serve more > than 3000 requests per/sec you will need to increase > you fd soft limit. > > Also there is a caching bug in Simple 2.8.1. This > causes files to be open of each request. So for your > test of 1000 files, 2000 files will be required. How? > well 1000 sockets and 1000 fds for index.html. To fix > the caching bug modify > simple.http.serve.BufferedConent and replace the > following > > bug: > > public void write(OutputStream out) throws > IOException { > if(count > 0) { > out.write(cache); > } > int size = getLength(); > > if(size > 0) { > write(out,size); > } > } > > fix: > > public void write(OutputStream out) throws > IOException{ > if(cache == null) { > int size = getLength(); > > if(size > 0) { > write(out,size); > } > } else { > out.write(cache); > } > } > > Hope this helps! > Niall > The bugfix did the trick, thx! The file descriptors weren't the problem here since I was testing with *only one* client (one thread). After the fix I succesfully completed the same simple test also with 100 continuos clients. |