Domino within screen session and ulimits

22 January 2015 16:58:18 | Tags: Domino  Administration  Linux 

I run my development and testing servers mostly on Linux. To automatically start the Domino servers, I like to run them within a screen session. This allows me to detach and attach the console session very easily.
This is my startup command line - I use it somewhere for my startup scripts:

su - notes -c "cd /local/notesdata && screen -d -m -S DOMINO /opt/ibm/domino/bin/server"


To attach to the console I have to enter
screen -r DOMINO
(the DOMINO session name is case sensitive) and
CTRL+a,d
(hold CTRL and press 'a' and 'd' one after the other) to detach from a running screen session.

Works perfect so far. But after a while, I get lots of messages that remind me to change the ulimits for the Domino user:
21.01.2015 18:21:26 WARNING: The maximum number of file handles (ulimit -n) allowed for Domino is 4096. See IBM Lotus Tech Note 1221870 and set the allowable maximum to 60000.
21.01.2015 18:26:27 WARNING: The maximum number of file handles (ulimit -n) allowed for Domino is 4096. See IBM Lotus Tech Note 1221870 and set the allowable maximum to 60000.
21.01.2015 18:31:28 WARNING: The maximum number of file handles (ulimit -n) allowed for Domino is 4096. See IBM Lotus Tech Note 1221870 and set the allowable maximum to 60000.
21.01.2015 18:36:28 WARNING: The maximum number of file handles (ulimit -n) allowed for Domino is 4096. See IBM Lotus Tech Note 1221870 and set the allowable maximum to 60000.


There is a technote, that explains what is happening, but not the underlying processes in detail. After all, you will have to dig into the pam-mechanism...
Technote 1221870 : Message 'Maximum number of file handles allowed for Domino is 1024'

...or take this shortcut and just add (if missing) or complete the /etc/pam.d/screen file to enable pam_limits.so.

[root@iodev ~]# cat /etc/pam.d/screen
#%PAM-1.0
auth    include         system-auth
session required        pam_limits.so


And as mentioned in the technote, add limits for the Domino user (here it is 'notes'):
notes           hard    nofile          60000
notes           soft    nofile          60000


Finally, the result (success!!) is shown on the server's console:
21.01.2015 23:29:00   INFO: The maximum number of file handles (60000) allowed for Domino is sufficient. 


UPDATE: If you are running your servers by an automatic startup script, you have to enable pam_limits.so for another config file:

[root@iodev ~]# tail -n 1 /etc/pam.d/systemd-user
session required        pam_limits.so



Comments [0]