Let me know if this helps:
lighttpd 1.5 has externalized spawn-fcgi
> spawn-fcgi --help
Usage:
spawn-fcgi [OPTION...] -- <fcgiapp> [fcgi app arguments]
spawn-fcgi-2.0.0 - spawns fastcgi processes
Help Options:
-?, --help Show help options
Application Options:
-f, --application=fcgiapp Filename of the fcgi-application
-a, --address=addr Bind to ip address
-p, --port=port Bind to tcp-port
-s, --socket=path Bind to unix-domain socket
-U, --socket-uid=user change unix-domain socket owner to user-id
-G, --socket-gid=group change unix-domain socket group to group-id
-M, --socket-mode=mode change unix-domain socket mode
-C, --phpchilds=childs (PHP only) Number of childs to spawn
(default 5)
* -F, --childs=childs Number of childs to fork (default 1)*
-P, --pid=path Name of PID-file for spawned process
-n, --no-daemon Don't fork (for daemontools)
--keep-fds Keep stdout/stderr open (default for
--no-daemon)
--close-fds Close stdout/stderr (default if not
--no-daemon)
-v, --version Show version
-c, --chroot=dir (root only) chroot to directory
-u, --uid=user (root only) change to user-id
-g, --gid=group (root only) change to group-id
-l, --limits Set limits using /etc/security/limits.conf
thus..
> sudo spawn-fcgi -s /var/www/.socket -F 2 -- /usr/local/bin/python
/var/www/code.py
Child spawned successfully: PID: 17341
Child spawned successfully: PID: 17342
Child spawned successfully: PID: 17343
This spawns 3 processes (2 forks) x 5 threads each == 15 handlers all
referenced via the new simplified syntax..
server.modules = (
"mod_proxy_core",
"mod_proxy_backend_fastcgi",
"mod_rewrite"
)
$HTTP["host"] == "example.org" {
proxy-core.balancer = "sqf"
proxy-core.protocol = "fastcgi"
proxy-core.max-pool-size = 5
proxy-core.backends = ( "unix:/var/www/.socket" )
url.rewrite-once = (
"^/(.*)$" => "/code.py/$1"
)
}
Alas, lighttpd 1.5 was pre-released just over two years ago [1] but appears
to be quite stable (and elegant) in the eyes of the community and from
personal experience.
*Disclaimer: not sure if proxy-core.max-pool-size [2] should be 5 or 15 in
this case.*
[1]
http://blog.lighttpd.net/articles/2007/09/06/pre-release-lighttpd-1-5-0-r1992
[2] http://redmine.lighttpd.net/projects/1/wiki/Docs:ModProxyCore
On Mon, Sep 14, 2009 at 3:24 PM, alexander lind <[email protected]>wrote:
>
> If using PHP, one can in lighttpd set 'PHP_FCGI_CHILDREN', to
> determine how many forks per php process lighttpd will allow.
>
> Does anyone here know if there is an equivalent setting for a wsgi
> python fastcgi server in lighttpd?
>
> By default it seems to be 5. I'd like to bump this setting up some.
>
> Thanks
> Alec
>
> >
>
--
Angelo Gladding
[email protected]
http://angelo.gladding.name/
E69E 47E8 5C3A 96E5 C70F
D931 F35C ACBA 6F39 9611
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---