Univention Bugzilla – Bug 45309
Too many open files in UMC
Last modified: 2017-10-10 15:38:47 CEST
We received the following UMC abort from a customer environment:
08.07.17 15:36:27.299 MAIN ( ERROR ) : Error during handling a
request: Traceback (most recent call last):
line 155, in _receive
line 204, in _handle
line 457, in reload
line 391, in load
OSError: [Errno 24] Too many open files:
After some more debugging, we found that the soft limit for open file descriptors was reached:
PID [PROCESS] limit Hard limit Open files
689 [/usr/bin/python2.7/usr/sbin/univention-management-console-serverrestart] 4096 64512 4297
The soft limit is set directly in UMC so that the limits settings are ignored (/etc/security/limits.conf).
Created attachment 9161 [details]
Simple script to check the max open file settings.
Created attachment 9162 [details]
Patch to increase the soft limit:
patch -p0 -d / <umc_soft_limits.patch
We introduced this code in Bug #39909. UMC never took any limits from /etc/security/limits.conf.
The default value of UCS is:
* soft nofile 32768
* hard nofile 32768
but somehow these limits aren't evaluated by python(?) processes.
I get the following limits if I remove the code:
Max open files 1024 4096 files
So I will take Stefans patch.
836f0ab374b7 | Merge branch 'fbest/45309-umc-soft-limits' into 4.2-2
399cddd08e52 | Bug #45309: raise soft limit for max open files of the UMC server
baa9d275dc8a | YAML Bug #45309
OK, works. UMC Server is able to hold the desired amount of file descriptors as of 9.0.80-71:
27299 [/usr/bin/python2.7/usr/sbin/univention-management-console-serverstart] 64512 64512 64690