Edgewall Software

Opened 10 years ago

Closed 9 years ago

#8899 closed defect (cantfix)

File leak? Or normal caching? (too many open files)

Reported by: kutzera@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.6
Severity: normal Keywords: needinfo
Cc: Branch:
Release Notes:
API Changes:


I get the following failures:

IOError: [Errno 24] Too many open files: 'c:\\\\python25\\\\lib\\\\site-packages\\\\Trac-0.11.6-py2.5-win32.egg\\\\trac\\\\web\\\\main.py'


TemplateNotFound: Template "index.html" not found

Although one time its the first one and the another time its the second one, I assume the the second one is a side effect of the first one.

First: I am running trac on Windows XP, which is restricting open file count.

Now, I am not sure if this behaviour could be normal. Maybe caching layers hold file handles for performance reasons.

I have played around around with some settings and found following behaviour:

With ThreadsPerChild = 50 (or 200) (Apache setting) I see apache is opening one trac log file after another. It seems to open one handle for the log file per access _and_ per project. I have around 15 trac projects, so after 10 website calls I got 150 file handles. (Whatched with Process Explorer). After some time the errors noted will start.

I reduced the ThreadsPerChild to ten and wondered, that the file handle growing did not stop at ten per project log file. This is why I am posting here.

The logging settings of trac are: log_type = file log_level = CRITICAL

After turning off logging with log_type = none my server runs well again (hopefully). At least I don't see the handle count rising.

So, whats the reason: A leak with file handles? Or is it some cache mechanism, which reaches XP limits?

I run the following components:

batchmod.* enabled 
customfieldadmin.* enabled 
customroadmap.* enabled 
mastertickets.* enabled 
revtree.* enabled 
ticketmoverplugin.ticketmover.ticketmover enabled 
ticketmoverplugin.web_ui.ticketmoverhandler enabled 
ticketmoverplugin.web_ui.ticketmoversidebar enabled 
ticketsidebarprovider.ticketsidebar.ticketsidebarprovider enabled 
trac.ticket.query.* enabled 
trac.ticket.query.querymodule enabled 
trac.ticket.query.ticketquerymacro enabled 
tracsearchall.searchall.searchallplugin enabled 
tractags.* enabled 
tractags.api.tagsystem enabled 
tractags.macros.listtaggedmacro enabled 
tractags.macros.tagcloudmacro enabled 
tractags.model.tagmodelprovider enabled 
tractags.ticket.tickettagprovider enabled 
tractags.web_ui.tagrequesthandler enabled 
tractags.web_ui.tagtemplateprovider enabled 
tractags.wiki.tagwikisyntaxprovider enabled 
tractags.wiki.wikitaginterface enabled 
tractags.wiki.wikitagprovider enabled 

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 10 years ago

Which Python version are you using? Also is that mod_python or mod_wsgi?

We have to narrow that down, try also the following two things:

  • use tracd instead of Apache
  • see if the problem also happens with Trac alone (i.e. no plugins); if not, try reintroduce plugins one by one

comment:2 by anonymous, 10 years ago

Trac: 0.11.6 
Python: 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] 
setuptools: 0.6c11 
SQLite: 3.3.4 
pysqlite: 2.3.2 
Genshi: 0.5.1 
mod_python: 3.3.1 
Pygments: 0.9 
Subversion: 1.6.6 (r40053) 
CustomFieldAdmin: 0.2.2 
jQuery: 1.2.6 

in reply to:  1 comment:3 by Christian Boos, 10 years ago

Keywords: needinfo added

We have to narrow that down, try also the following two things:

  • use tracd instead of Apache
  • see if the problem also happens with Trac alone (i.e. no plugins); if not, try reintroduce plugins one by one

Any feedback on these ones?

comment:4 by Christian Boos, 9 years ago

Resolution: cantfix
Status: newclosed

No feedback, closing.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from (none) to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.