|<B>--maxrequestsB>||Set maximum number of requests per process. Read also --man.|
|<B>--helpB>||Print a brief help message and exits.|
|<B>--manB>||Prints the manual page and exits.|
When youre ready to move up to something that can handle the increasing load your new world-changing application is generating, youll need something a bit heavier-duty than the pure-perl Jifty standalone server. FastCGI is what youre looking for.
If you have MaxRequests options under FastCGI in your config.yml, or command-line option --maxrequests=N assigned, the FastCGI process will exit after serving N requests.
# These two lines are FastCGI-specific; skip them to run in vanilla CGI mode AddHandler fastcgi-script fcgi FastCgiServer /path/to/your/jifty/app/bin/jifty -initial-env JIFTY_COMMAND=fastcgi DocumentRoot /path/to/your/jifty/app/share/web/templates ScriptAlias / /path/to/your/jifty/app/bin/jifty/
An alternative to Apache mod_fastcgi is to use mod_fcgid with mod_rewrite. If you use mod_fcgid and mod_rewrite, you can use this in your Apache configuration instead:
DocumentRoot /path/to/your/jifty/app/share/web/templates ScriptAlias /cgi-bin /path/to/your/jifty/app/bin DefaultInitEnv JIFTY_COMMAND fastcgi <Directory /path/to/your/jifty/app/bin> Options ExecCGI SetHandler fcgid-script </Directory> <Directory /path/to/your/jifty/app/share/web/templates> RewriteEngine on RewriteRule ^$ index.html [QSA] RewriteRule ^(.*)$ /cgi-bin/jifty/$1 [QSA,L] </Directory>
It may be possible to do this without using mod_rewrite.
Version 1.4.23 or newer is recommended, and you may adapt this config:
server.modules = ( "mod_fastcgi" ) server.document-root = "/path/to/your/jifty/app/share/web/templates" fastcgi.server = ( "/" => ( "your_jifty_app" => ( "socket" => "/tmp/your_jifty_app.socket", "check-local" => "disable", "fix-root-scriptname" => "enable", "bin-path" => "/path/to/your/jifty/app/bin/jifty", "bin-environment" => ( "JIFTY_COMMAND" => "fastcgi" ), "min-procs" => 1, "max-procs" => 5, "max-load-per-proc" => 1, "idle-timeout" => 20, ) ) )
Versions before 1.4.23 will work, but you should read Plack::Handler::FCGIs lighttpd documentation <http://search.cpan.org/dist/Plack/lib/Plack/Handler/FCGI.pm#lighttpd> for how to configure your server.
Since this uses Plack::Handler::FCGI, you might also want to read its documentation on webserver configurations <http://search.cpan.org/dist/Plack/lib/Plack/Handler/FCGI.pm#WEB_SERVER_CONFIGURATIONS>.
Creates a new FastCGI process.
|perl v5.20.3||JIFTY::SCRIPT::FASTCGI (3)||2011-01-25|