[Catalyst] Catalyst on Windows: fork issues

Stefan Washietl wash at paperpile.org
Fri Feb 27 16:47:33 GMT 2009


Thanks for all your tips. I will have a look at Apache. It also seems to 
be quite lightweight and it seems to be better supported under Windows 
than lighttpd.

Rodrigo wrote:
> Stefan, I've had similar problems in windows with prefork, which can be 
> started up after some tweaking, but will hang after a few requests. 
> Perl's fork() is a no-no in windows. FCGI can be painful to setup, so I 
> ended up giving up on it. I went on to use mod_perl with Apache, which 
> has problems of its own too, but a more trivial setup. Finally, the 
> approach I'm using right now is to setup a pool of single-threaded 
> Catalyst dev servers, starting them up in a startup.bat such as this:
> 
> start /b perl script\myapp_server.pl -p 3000
> start /b perl script\myapp_server.pl -p 3001
> start /b perl script\myapp_server.pl -p 3002
> ...
> 
> If you wish to keep all your logs in one place:
> 
> startup.bat >myapp.log 2>&1
> 
> Then setup an Apache mod_proxy load-balancer (or lighttpd's, etc.) to 
> balance the load among dev servers. Make sure you understand the 
> drawbacks of using catalyst dev servers in this manner, even though they 
> work superbly.
> 
> httpd.conf (or apache2.conf or etc.):
> 
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> 
> <Proxy balancer://cat>
>   BalancerMember http://localhost:3000
>   BalancerMember http://localhost:3001
>    BalancerMember http://localhost:3002
> </Proxy>
> 
> ProxyPass / balancer://cat/
> ProxyPassReverse / balancer://cat/
> 
> Take a look around the web for other settings that you may need, such as 
> catalyst's "using_frontend_proxy" and apache's static aliases, balancer 
> features, etc. Apache is extremely lightweight if you only run it for 
> reverse proxy load-balancing.
> 
> If you want to startup your catalyst server pool from a windows service 
> using a configuration file, I have a perl script that does that 
> somewhere. Just let me know.
> 
> Hope this works for you.
> 
> --rodrigo
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list