Roundup Tracker - Issues

Issue 1675845

classification
Apache + ModPython - too many open files
Type: resource usage Severity: major
Components: Web interface Versions:
process
Status: closed
:
: richard : ernestoongaro, mcampos4, richard, tmikk, wolever
Priority: normal :

Created on 2007-03-07 15:38 by tmikk, last changed 2010-02-01 02:58 by richard.

Messages
msg2406 Author: [hidden] (tmikk) Date: 2007-03-07 15:38
I am submitting this as per Richard's suggestion.  

Hello, I run Roundup 1.3.2 with SqLite backend with Apache and 
ModPython.  I noticed that every four or five days the web interface for 
the tracker starts to error out with the error message below.  This is 
resolved by restarting Apache.  I wonder what may be causing this error?

Thank you,
Tonu

Mod_python error: "PythonHandler roundup.cgi.apache"

Traceback (most recent call last):

  File "C:\Python24\Lib\site-packages\mod_python\apache.py", line 299, in HandlerDispatch

  File "C:\Python24\Lib\site-packages\roundup\cgi\apache.py", line 95, in handler

  File "C:\Python24\Lib\site-packages\roundup\instance.py", line 257, in open

  File "C:\Python24\Lib\site-packages\roundup\instance.py", line 54, in __init__

  File "C:\Python24\Lib\site-packages\roundup\instance.py", line 79, in get_backend_name

IOError: [Errno 24] Too many open files: 'C:/roundup/dmc\\db\\backend_name'





-------------------------------------------------------------------------
msg2407 Author: [hidden] (richard) Date: 2007-03-13 02:30
Could you please see whether "lsof" will tell us what file the Roundup process is opening too many times?
msg2408 Author: [hidden] (mcampos4) Date: 2007-03-19 17:25
I am also experiencing this issue.  lsof shows the problem is the roundup log (i.e. [logging].filename).  I restarted our server last night and lsof is already showing 442 open roundup logs.
msg3893 Author: [hidden] (ernestoongaro) Date: 2009-10-22 17:37
Got a 503 error from my web server and this in the apache2 error log:

[Tue Oct 20 10:32:03 2009] [error] [client XXXXXX] PythonHandler
roundup.cgi.apache: IOError: [Errno 24] Too many open files:
'/opt/roundup/trackers/content_tracker/db/backend_name'
====
Did an `lsof -c apache2` showed a bunch of instances of the error file open:

apache2 31916 www-data 19w REG 0,214 375242 13829550
/opt/roundup/trackers/content_tracker/error.log
====
Seems like every time an error is logged it opens a new instance of the
file for writing until Python complains and crashes Apache. My verbosity
level was set to INFO, changing it to WARNING slows it down (less logs,
less times it opens the file).
====
I'm not a developer but I think line 1290 of configuration.py has
something to do with it "no logging API to remove all existing
handlers!?!" 
(http://svn.roundup-tracker.org/viewvc/roundup/roundup/trunk/roundup/configuration.py?view=markup)
msg3906 Author: [hidden] (wolever) Date: 2009-11-12 17:27
I'm noticing this same issue running Roundup behind WSGI. It seems like, on each request, the 
log file is opening twice (according to `lsof | grep roundup.log | wc`).

As a temporary fix I've turned off logging (by removing the logfile).
msg4004 Author: [hidden] (richard) Date: 2010-02-01 02:58
I have confirmed that the logging configuration leaks files. A fix has been 
checked in.
History
Date User Action Args
2010-02-01 02:58:13richardsetstatus: open -> closed
2010-02-01 02:58:01richardsetmessages: + msg4004
2009-11-12 17:27:58woleversetnosy: + wolever
messages: + msg3906
2009-10-22 17:37:32ernestoongarosetmessages: + msg3893
2009-10-22 17:31:14ernestoongarosettype: resource usage
severity: normal -> major
2009-10-22 17:30:44ernestoongarosetnosy: + ernestoongaro
2007-03-07 15:38:37tmikkcreate