Re: [Cppcms-users] xsendfile
Brought to you by:
artyom-beilis
From: Markus R. <us...@ma...> - 2009-12-04 16:05:15
|
Artyom wrote: >> But because of another bug I can't use lighttpd (at least the 1.4.*): >> http://redmine.lighttpd.net/issues/show/729 > > Have you tried to use it with URL-rewriting? Url rewriting would solve > this problem for you. Yes, you are right, that works. But I have another strange error when using lighttpd: 2009-12-04 16:52:34: (mod_fastcgi.c.2900) backend is overloaded; we'll disable it for 2 seconds and send the request to another backend instead: reconnects: 0 load: 3 2009-12-04 16:52:34: (mod_fastcgi.c.3542) all handlers for /src/url_to_file/Bilder/Orte/Schweiz2008/Uni Lichthof.jpg on /src/url_to_file are down. 2009-12-04 16:52:37: (mod_fastcgi.c.2673) fcgi-server re-enabled: 0 /tmp/fcgi-hello.socket 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. This problem is also easily reproduceable without ab by just opening an image gallery (where the browser opens dotzends of connections to download all thumbnails). The Result is that some images are not displayed. The problem occurs with standard config by cppcms and also the config with url rewriting: ----- rewrite config ------- server.modules = ("mod_fastcgi", "mod_rewrite") server.document-root = "/home/markus/Projekte/Homepage/" server.pid-file = "/home/markus/cppcms/url_to_file/build64/cppcms_rundir/srv.pid" server.port = 8080 server.bind = "markusbyte" url.rewrite = ("^(.*)" => "/src/url_to_file/$0") fastcgi.server = ( "/src/url_to_file" => ( "localhost" => ( "check-local" => "disable", "max-procs" => 1, "idle-timeout" => 20, "socket" => "/tmp/fcgi-hello.socket", "allow-x-send-file" => "enable" ))) ----- rewrite config ------- > However I don't think this is really necessary. > > The real issue is that Apache, Nginx and Lighttpd have different semantics > for X-Send-File... So the CppCMS based software should deal with them > differently, when the script tryes to unify the access to all web servers > -- so it some kind of contradiction. You are correct about that. Might not be as useful to have it in default cppcms_run configs. > I would suggest, for special cases where you do need to tweak web server > configuration, just create a configuration file and run web server > directly like: > > /usr/sbin/lighttpd -D -f ligthy.conf > > That's it. You can keep it persistent and not shut down when you work, > because in any case of new connection it would try to make a new one so > when you shut CppCMS application down, web server would not even notice. > > Only thing that remains is to run ./foobar -c config.txt Thank you, good idea. Markus -- http://www.markus-raab.org | Es genügt nicht, keine Gedanken zu haben. -o) | Man muß auch unfähig sein, sie Kernel 2.6.24-1-a /\ | auszudrücken. -- Karl Kraus on a x86_64 _\_v | |