LaiRu FPM
LaiRu FPM is the FastCGI process manager used behind nginx or Apache.
Target
lairu-fpm keeps worker processes available for a web server. It can listen on a TCP address or unix socket, enforce worker lifetime limits, and receive document-root information from configuration or FastCGI parameters.
Parameters
--config- Path to an ini file. Defaults can be read from
/etc/lairu/config/or fromconfig/beside the binary. --addr- TCP address for FastCGI, usually loopback such as
127.0.0.1:9021. --unix- Unix socket path, commonly
/run/lairu/lairu-fpm.sock. --docroot- Fallback document root when the web server does not provide one.
--max-children- Maximum number of worker processes.
--max-requests- Requests served by a worker before it is recycled.
--worker-stack-bytes- Worker stack size for deeply nested application code.
--multiplex- Whether to accept multiplexed FastCGI requests when the web server uses them.
Examples
Working pattern
1lairu fpm --unix /run/lairu/lairu-fpm.sock --docroot /var/www/htmlUse this as a focused starting point and adapt it in context.
Run LaiRu FPM on a unix socket
1lairu fpm \2 --unix /run/lairu/lairu-fpm.sock \3 --docroot /var/www/html \4 --config /etc/lairu/config/lairu-fpm.ini \5 --max-children 8 \6 --max-requests 1000Use a unix socket when the web server and process manager run on the same host. Use TCP when they are deliberately separated.
Run LaiRu FPM on TCP
1lairu fpm \2 --addr 127.0.0.1:9021 \3 --docroot /var/www/html \4 --multiplex onKeep TCP listeners bound to loopback unless the network boundary is intentionally controlled elsewhere.