Debian 8 Systemd Change Service Ulimit

I was trying to set ulimit -n for redis-server, but neither /etc/security/limits.conf nor ulimit work.

Here is the solution:
1 open /lib/systemd/system/redis-server.service
2 add following lines to ‘[Service]

3 reload daemon

4 restart service

Same for php5-fpm.

Other ulimit related keys:

Debian 8 Systemd Change Service Ulimit by @sskaje: https://sskaje.me/2015/06/debian-8-systemd-change-service-ulimit/

Incoming search terms: