Re: [Cppcms-users] xsendfile
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2009-12-05 21:17:45
|
> But I have another strange error when using lighttpd: > 2009-12-04 16:52:34: (mod_fastcgi.c.2900) backend is > overloaded; > ... > When I benchmarked it with ab (from apache-utils) I see > that 2, 3 > connections at once work without any problems, but when I > change > concurrency to about 5 it fails: > Failed requests: 2 > (Connect: 0, Receive: 0, Length: 2, > Exceptions: 0) > > Its always 2 failed requests, the other "succeed" with 500 > - Internal Server > Error. > Other: > > server.port = 8080 > server.bind = "markusbyte" > Ok, first of all what "server.*" configuration are you using What Server API do you use, what model threaded or prefork? How many threads processed do you define? What buffer parameter do you use? I would recommend: Make "server.buffer" parameter big as twice as exepected cuncurrent requests no. Also provide reasonable number for "server.threads" or "server.procs" according to the mode you use. The default workers number is 5 which may explain the issue. See: http://cppcms.sourceforge.net/wikipp/en/page/ref_config Server API, and Server Mod. You may want something like: server.mod = "thread" # -- multithreaded working model server.threads = 20 # 20 or much more cuncurrent workers # but not too much server.buffer = 1000 # the size of queue of incoming requests What happens that lighttpd creates more connections than the server can handle. Giving big buffer value allows CppCMS service accept new connections and put them to queue, thus preventing of lighttpd report 500 -- overloaded service. Best, Artyom |