Skip to content

Resources ยท Saphira-D systemd

php-fpm85.service

PHP 8.5 FastCGI Process Manager, used by webDragon for dynamic PHP workloads.

Saphira Linux dragon mascot

What this unit does

php-fpm85 runs the PHP 8.5 FastCGI Process Manager. webDragon passes PHP requests to it over the Unix socket /run/php-fpm85/php-fpm.sock. The unit runs the manager in the foreground (-F) so systemd owns the process, raises LimitNOFILE so it can hold many sockets, and reloads with USR2.

Unit file

systemd units belong in /usr/lib/systemd/system. The complete unit is shown below and can be downloaded as a file.

[Unit]
Description=PHP 8.5 FastCGI Process Manager
After=network.target

[Service]
Type=simple
LimitNOFILE=65535
RuntimeDirectory=php-fpm85
RuntimeDirectoryMode=0755
ExecStart=/usr/sbin/php-fpm85 -F
ExecReload=/bin/kill -USR2 $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target

Install manually

Place the unit in /usr/lib/systemd/system, reload the daemon, then enable it so it starts at boot:

install -m 0644 php-fpm85.service /usr/lib/systemd/system/
systemctl daemon-reload

Enable and disable

Enable and start now:

root@saphira-d:/etc/php-fpm.d# systemctl enable --now php-fpm85.service
Created symlink '/etc/systemd/system/multi-user.target.wants/php-fpm85.service' -> '/usr/lib/systemd/system/php-fpm85.service'.

Disable and stop now:

root@saphira-d:/etc/php-fpm.d# systemctl disable --now php-fpm85.service
Removed '/etc/systemd/system/multi-user.target.wants/php-fpm85.service'.