Systemd
Configuring unit
Here you can find an example of systemd unit file that can be used to run RoadRunner as a daemon on a server:
Where:
/usr/local/bin/rr
- path to the RoadRunner binary file/var/www/.rr.yaml
- path to the RoadRunner configuration file
These paths are just examples, and the actual paths may differ depending on the specific server configuration and file locations. You should update these paths to match the actual paths used in your server setup.
You should also update the ExecStart
option with your own configuration and save the file with a suitable name, such as rr.service
. Usually, such user unit files are located in the .config/systemd/user/
directory. To enable the service, you should run the following commands:
and
This will start RoadRunner as a daemon on the server.
For more information about systemd unit files, the user can refer to the following link.
Status and logs
Make sure that the systemd service has started successfully, use the command:
Example output:
To view logs in real time, use the command:
Example output with info
level logs:
sd_notify
protocol
sd_notify
protocolRoadrunner supports sd_notify protocol. You can use it to notify systemd about the readiness of your application. Don't forget to add Type=notify
directive to the Service
section, Roadrunner will automatically detect systemd and send the notification. The only one option which might be configured is watchdog timeout. By default, it's turned off. You can enable it by setting the following option in your .rr.yaml
config:
Last updated