On 7/27/2016 9:35 AM, matthew venn wrote:
> 
> My question is related to starting machinekit at boot. I've made a 
> supervisord 
> config which at least looks like it starts working (correct user and limited 
> environment variables set):
> 
> [program:bipod]
> directory=/home/machinekit/
> user=machinekit
> autostart=false
> redirect_stderr=true
> autorestart=false
> command=/usr/bin/linuxcnc /home/machinekit/bipod/bipod.ini
> environment=HOME="/home/machinekit/",USER="machinekit"
> 
> However it doesn't start properly and the logs include the lines:
> 
> mlock(global) failed: 12 'Cannot allocate memory'
> msgd:0: Locked memory limit is 64KiB, recommended at least 20480KiB.
> 
> Startup log pasted here: http://pastebin.com/hT64nxRL
> 
> I can't figure out why the memory might be limited when started by 
> supervisord. 
> The user is set to machinekit, and that user has memory allocation of 32768k 
> in
> /etc/security/limits.d/machinekit.conf
> 
> Any clues gratefully received, and thanks for the help!

This looks like a problem with supervisord, similar to what happens
with ssh (which also ignores PAM limits by default).  I don't use
supervisor, but after a bit of Googling it looks like you either need
to increase the memory limits prior to running supervisord, or add
something to the launch script that will set the limits.  Most of the
links I found talked about increasing the maximum number of open
files, but increasing locked memory should be similar.

Looks like a great build!

-- 
Charles Steinkuehler
[email protected]

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to