.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "FCGI::Engine::Manager 3pm" .TH FCGI::Engine::Manager 3pm "2021-01-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" FCGI::Engine::Manager \- Manage multiple FCGI::Engine instances .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& #!/usr/bin/perl \& \& my $m = FCGI::Engine::Manager\->new( \& conf => \*(Aqconf/my_app_conf.yml\*(Aq \& ); \& \& my ($command, $server_name) = @ARGV; \& \& $m\->start($server_name) if $command eq \*(Aqstart\*(Aq; \& $m\->stop($server_name) if $command eq \*(Aqstop\*(Aq; \& $m\->restart($server_name) if $command eq \*(Aqrestart\*(Aq; \& $m\->graceful($server_name) if $command eq \*(Aqgraceful\*(Aq; \& print $m\->status($server_name) if $command eq \*(Aqstatus\*(Aq; \& \& # on the command line \& \& perl all_my_fcgi_backends.pl start \& perl all_my_fcgi_backends.pl stop \& perl all_my_fcgi_backends.pl restart foo.server \& # etc ... .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module handles multiple FCGI::Engine instances for you, it can start, stop and provide basic status info. It is configurable using Config::Any, but only really the \s-1YAML\s0 format has been tested. .SS "Use with Catalyst" .IX Subsection "Use with Catalyst" Since FCGI::Engine is pretty much compatible with Catalyst::Engine::FastCGI, this module can also be used to manage your Catalyst::Engine::FastCGI based apps as well as your FCGI::Engine based apps. .SS "Use with Plack" .IX Subsection "Use with Plack" Plack support is provided via the FCGI::Engine::Manager::Server::Plackup module. All that is required is setting the \f(CW\*(C`server_class\*(C'\fR parameter in the configuarion and it will Just Work. .SH "EXAMPLE CONFIGURATION" .IX Header "EXAMPLE CONFIGURATION" Here is an example configuration in \s-1YAML,\s0 it should be noted that the options for each server are basically the constructor params to FCGI::Engine::Manager::Server and are passed verbatim to it. This means that if you subclass FCGI::Engine::Manager::Server and set the \f(CW\*(C`server_class:\*(C'\fR option appropriately, it should pass any new options you added to your subclass automatically. The third server in the list shows exactly how this is used with a Plack application. .PP .Vb 10 \& \-\-\- \& \- name: "foo.server" \& server_class: "FCGI::Engine::Manager::Server" \& scriptname: "t/scripts/foo.pl" \& nproc: 1 \& pidfile: "/tmp/foo.pid" \& socket: "/tmp/foo.socket" \& additional_args: [ "\-I", "lib/" ] \& \- name: "bar.server" \& scriptname: "t/scripts/bar.pl" \& nproc: 1 \& pidfile: "/tmp/bar.pid" \& socket: "/tmp/bar.socket" \& \- name: "baz.server" \& server_class: "FCGI::Engine::Manager::Server::Plackup" \& scriptname: "t/scripts/baz.psgi" # the .psgi file \& nproc: 1 \& pidfile: "/tmp/baz.pid" \& socket: "/tmp/baz.socket" \& additional_args: [ "\-E", "production" ] # plackup specific option .Ve .SH "BUGS" .IX Header "BUGS" All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. .SH "AUTHOR" .IX Header "AUTHOR" Stevan Little .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2007\-2010 by Infinity Interactive, Inc. .PP .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.