The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FCGI::ProcManager::Dynamic - extension of FCGI::ProcManager - functions for managing FastCGI applications. Here been add operations for dynamic managment of work processes.

SYNOPSIS

# In Object-oriented style. use CGI::Fast; use FCGI::ProcManager::Dynamic; my $proc_manager = FCGI::ProcManager->new({ n_processes => 8, min_nproc => 8, max_nproc => 32, delta_nproc => 4, delta_time => 60, max_requests => 300 }); $proc_manager->pm_manage(); while ($proc_manager->pm_loop() && (my $cgi = CGI::Fast->new())) { $proc_manager->pm_pre_dispatch(); # ... handle the request here ... $proc_manager->pm_post_dispatch(); }

DESCRIPTION

FCGI::ProcManager::Dynamic doin some for FCGI::ProcManager, but including extent parameters and functions for operation with count of work processes.

Addition options

min_nproc

 Minimal count of work processes.

max_nproc

 Maximal count of work processes.

delta_nproc

 How match of work process need change for one time.

delta_time

 When after last nproc changes possible decrement for count work processes.

max_requests

 After work process processing this count of requests, work process finished and replacing for new work process.

Addition functions

pm_loop

 This function need for correct finalize work process in after working loop code. For example, if you need disconnection from database or other actions before destroy working process. It recomend for using if you use parameter "max_requests".

BUGS

No known bugs, but this does not mean no bugs exist.

SEE ALSO

FCGI::ProcManager FCGI

MAINTAINER

Andrey Velikoredchanin <andy@andyhost.ru>

AUTHOR

Andrey Velikoredchanin

COPYRIGHT

FCGI-ProcManager-Dynamic - A Perl FCGI Dynamic Process Manager Copyright (c) 2012, Andrey Velikoredchanin.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

BECAUSE THIS LIBRARY IS LICENSED FREE OF CHARGE, THIS LIBRARY IS BEING PROVIDED "AS IS WITH ALL FAULTS," WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF TITLE, NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS WITH THE YOU. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA