2

Odd issue, this'n!

As per the systemd man..

"The multiplicative suffixes K (=1024), M (=1024*1024) and so on for G, T, P and E may be used for resource limits measured in bytes (e.g. LimitAS=16G)."

Accordingly, I used a .service file that looks like this..

[Unit]
Description=FreeSWITCH
After=syslog.target network.target local-fs.target

[Service]
; service
Type=forking
PIDFile=/run/freeswitch/freeswitch.pid
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
TimeoutSec=45s
Restart=always
; exec
User=root
Group=daemon
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=240K
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007

[Install]
WantedBy=multi-user.target

Now when I run systemctl daemon-reload the syslog prints out.. systemd[1]: [/lib/systemd/system/freeswitch.service:22] Failed to parse resource value, ignoring: 240K

If I run systemctl start freeswitch it activates the service, and simply uses the default system value (as per ulimit -s)

I've tried to setting the logging for systemd to debug. Nothing else gets printed out.

Any idea on what might be the issue? I'm using Debian Jessie.

  • Does the online man page you quote refer to the same systemd version as you have installed? systemd used to change quite regularly and it may be that your implementation doesn't support these multiplicative suffixes? I mention it, because I've been caught out by that one :-) – garethTheRed May 5 '16 at 10:59
  • This turned out to be the issue.. I naively assumed the 'apt-get install systemd' would install the latest absolute version, but it didn't! Thanks for the direction – BIGMOOSE May 6 '16 at 12:25
0

The possibility to use suffixes like K and `M were introduced with systemd 228, Debian Jessie ships systemd 215 and hence cannot use this feature. As a workaround you can manually perform the multiplication and specify bytes instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.