Ulimit on RHEL 7 and BES 9.5 server

Not a question, just passing on what I learned today. RHEL 7 ulimits work differently on some types of server service startups. So if your using a RHEL root, I’m guessing your running a larger implementation and you should set the ulimits higher than 1024. You can’t use the normal /etc/security/limits.conf file. You have to create and app overwrite file. I would do this for both besserver and beswebreports.

mkdir /etc/systemd/system/beswebreports.service.d
mkdir /etc/systemd/system/besserver.service.d

cat >/etc/systemd/system/besserver.service.d/filelimits.conf <<EOF
[Service]
LimitNOFILE=infinity
EOF

cat >/etc/systemd/system/beswebreports.service.d/filelimits.conf <<EOF
[Service]
LimitNOFILE=infinity
EOF

…then reboot your server. Gives a result of this in the bes root logs:
Tue, 06 Nov 2018 10:19:39 -0500 - Main Thread (630691904) - Soft Limit for Max Open Files: 65536.

You can also validate the filelimits.conf file is in use by running:
[root@rootserver~]# systemctl status besserver.service
● besserver.service - SYSV: Starts and stops the IBM BigFix Server daemon
Loaded: loaded (/etc/rc.d/init.d/besserver)
Drop-In: /etc/systemd/system/besserver.service.d
└─filelimits.conf
Active: active (running) since Tue 2018-11-06 10:45:06 EST; 54min ago
Docs: man:systemd-sysv-generator(8)
Process: 2757 ExecStart=/etc/rc.d/init.d/besserver start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/besserver.service
└─2805 /opt/BESServer/bin/BESRootServer

Hope this helps someone else. I went round and round with support on our server crashing and they kept saying our ulimit was too low even though I THOUGHT I set it. Hope this helps them help others too. :wink:

5 Likes

Thanks for passing this along, very useful info!

Same process of besrelay. Works on RHEL and CenOS 7

mkdir /etc/systemd/system/besrelay.service.d

…and so on

Something else I learned the other week, you should do this too on db2.

Add the same LimitNOFILE=infinity to /etc/systemd/system/db2fmcd.service

@cmcannady

2 Likes

Does anyone know if these settings are still valid for RHEL 8 with BigFix 10.0.8?

Yes this should be valid for any system that uses systemd

Wow, this brings back memories.

A while back I managed an application which needed many such kernel modifications – first on Solaris, and then on RHEL. If memory serves, the linux needs could sometimes be met by using then-non-default kernels like SMP or himem. Whether a given kernel could be used in with its defaults, or needed additional modifications, was ever-evolving.

Fun times. :smiley:

1 Like

Thanks, @JasonWalker. We are experiencing intermittent FillDB crashes and support had us install a debug version of besfilldb and increase the ulimit to unlimited but we experienced another crash since. I was just wondering if these settings were something we should consider if support can’t find a cause since they haven’t mentioned it and I haven’t found it documented anywhere else.

I seem to recall @cmcannady presenting on these kinds of issues, at a pre-pandemic conference? A talk about real world issues running a Linux root server? (Casey, was that you?)

1 Like

@atlauren, yes sir… that was the one I did with @bigfix.mark while I was still at Kroger.

@626967666978, I would need a lot more context before I could advise. Please DM me with more specifics and I’ll try to help.

1 Like