How to configure unimrcpserver as a service on systemd for ubuntu
DaniloMurbach opened this issue · comments
Hi.
What's the right way to configure unimrcpserver to work properly inside systemd. I've tried to create a service here.
/etc/systemd/system/unimrc.service
With the following content:
[Unit]
Description=Linux Unimrcp server
After=syslog.target network.target
Documentation=https://mrcp.paneas.com/asr/docs/latest
[Service]
Type=simple
StandardOutput=null
StandardError=null
RestartSec=2min
TimeoutStartSec=1min
TimeoutStopSec=30s
ExecStart=/usr/local/unimrcp/bin/unimrcpserver -r /usr/local/unimrcp -o 3
Restart=on-failure
SuccessExitStatus=0 143
RestartPreventExitStatus=0 143
[Install]
WantedBy=multi-user.target
It works, but it takes a hole vCPU when the service starts and keeps using 100% of 1 vCPU as long as the service is up.
Thanks
While installing UniMRCP server binaries from the APT reporitory, the systemd unit file is getting installed as follows. Pay attention to the option -w
#cat /lib/systemd/system/unimrcp.service
[Unit]
Description=UniMRCP Server
After=network.target
[Service]
Type=simple
ExecStart=/opt/unimrcp/bin/unimrcpserver -r /opt/unimrcp -o 2 -w
Restart=on-abort
[Install]
WantedBy=multi-user.target
Hi Arsen, thanks.
I did this setup like your example, now It is running the way that suposed to.
Best Regards
Danilo Murbach