janus-gateway-snap
janus-gateway-snap copied to clipboard
How to alter ulimit for snap ?
unable to alter ulimit event installing with --classic any other way to tweak this setting ?
https://github.com/RSATom/janus-gateway-snap/issues/4 I've already investigated this question, and didn't find any way to do it.
I solved it by systemctl edit snap.janus-gateway.janus-gateway.service
[Service]
LimitNOFILE=65536
I solved it by
systemctl edit snap.janus-gateway.janus-gateway.service
[Service] LimitNOFILE=65536
This helped.... maybe add into the Snap ?
there is no access to .service file from snap itself...
Some maybe useful hints I've found https://forum.snapcraft.io/t/how-to-customize-systemd-service-created-by-snapd/18397/3
Some maybe useful hints I've found https://forum.snapcraft.io/t/how-to-customize-systemd-service-created-by-snapd/18397/3
Command above just do it the same thing.
no, update snap package to new version can overwrite .service
file. So it worth try solution with .d
dir.
If you are running into problems with a hard limit or don’t control the snap’s source, you might be best off adding a drop-in file to augment the service file snapd wrote out. You’re correct that editing the service file produced by snapd is likely to be undone next time the snap upgrades.
If the service is called snap.snapname.servicename.service, create a directory /etc/systemd/system/snap.snapname.servicename.service.d, and create a file in that directory named set-file-limit.conf` with content like:
[Service] LimitNOFILE=...
This allows you to override the limit in a way that will survive upgrades, and won’t leave a zombie unit behind if you uninstall the snap.
systemctl edit creates drop-in file.
/etc/systemd/system/snap.janus-gateway.janus-gateway.service.d/override.conf
man systemctl
this command creates a drop-in file for each unit either for the system, for the calling user, or for all futures logins of all users.
@vterdunov good to know. :+1:
@vterdunov if you have any other performance tweaks please let me know ;-) I'm guessing nothing needs to be overridden outside the snap in the OS for limits.conf or systmctl.conf ?
Added hint to Readme. @vterdunov thanks!