Univention Bugzilla – Bug 35408
Filehandle for squidGuard.conf is not closed which disables UMC computerroom process
Last modified: 2014-12-01 12:07:15 CET
<class 'httplib.HTTPException'> 500 on slave111 (computerroom/settings/set): {"status": 591, ... [Errno 24] Zu viele offene Dateien\n"} root@slave111:~# lsof | grep 9887 | grep /etc/squid/squidGuard.conf | wc -l 1004 root@slave111:~# ps axfwww | grep 9887 9887 ? Sl 4:54 \_ /usr/bin/python2.6 /usr/sbin/univention-management-console-module -m computerroom -s /var/run/univention-management-console/9514-1405636139278.socket -d 2 -n qt -l de_DE.UTF-8
This is annoying in the ucs-test scripts: ucs-school-webproxy/conffiles/ucs-school-webproxy.py:101 (_, fn_temp_config, ) = tempfile.mkstemp(dir=DIR_ETC) mkstemp() returns an open file handle and the name of the temporary file. Python does not garbage collect the open file handle automatically, so the UMC module piles up open file handles. Fix: (fno, fn_temp_config, ) = tempfile.mkstemp(dir=DIR_ETC) os.close(fno)
In UMC modules like the computerroom module that calls UCR directly for setting proxy UCR variables, for each call at least one open file handle leaked. Due to heavy use of the module by users or test scripts, the maximum number of open file handles is reached and the module behaves faulty. Implemented the workaround of comment 1. ucs-school-webproxy (10.0.4-1) unstable; urgency=low Added changelog entry.
Changelog: OK Code-Review: OK Fix: OK, reproduced with the ucs-school tests.
UCS@school 3.2 R2 v2 has been released: http://docs.univention.de/release-notes-ucsschool-3.2R2v2-de.html If this error occurs again, please use "Clone This Bug".