Ticket #4081 (closed defect: worksforme)
trac server leaks memory/objects
| Reported by: | exarkun@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | devel |
| Severity: | major | Keywords: | memory |
| Cc: |
Description
Since updating to r4045 with this modification:
-
trac/db/sqlite_backend.py
139 139 """Connection wrapper for SQLite.""" 140 140 141 141 __slots__ = ['_active_cursors'] 142 poolable = have_pysqlite and sqlite_version >= 30301142 poolable = False # have_pysqlite and sqlite_version >= 30301 143 143 144 144 def __init__(self, path, params={}): 145 145 assert have_pysqlite > 0
my server stays up for more than a day at a time, apparently giving it time to leak a significant amount of memory or object references. It is currently up to 252m virtual/166m resident. Browsing the site will now occassionally give tracebacks like this one:
Traceback (most recent call last):
File "/home/trac/Projects/trac/trunk/trac/web/api.py", line 382, in send_error
'text/html')
File "/home/trac/Projects/trac/trunk/trac/web/chrome.py", line 475, in render_template
return stream.render(method, doctype=doctype)
File "/home/trac/Projects/genshi/trunk/genshi/core.py", line 146, in render
output = u''.join(list(generator))
File "/home/trac/Projects/genshi/trunk/genshi/output.py", line 200, in __call__
for kind, data, pos in stream:
File "/home/trac/Projects/genshi/trunk/genshi/output.py", line 486, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/home/trac/Projects/genshi/trunk/genshi/output.py", line 436, in __call__
for kind, data, pos in stream:
File "/home/trac/Projects/genshi/trunk/genshi/core.py", line 207, in _ensure
for event in stream:
File "/home/trac/Projects/genshi/trunk/genshi/core.py", line 207, in _ensure
for event in stream:
File "/home/trac/Projects/trac/trunk/trac/web/chrome.py", line 478, in _strip_accesskeys
for kind, data, pos in stream:
File "/home/trac/Projects/genshi/trunk/genshi/filters.py", line 313, in __call__
for kind, data, pos in stream:
File "/home/trac/Projects/genshi/trunk/genshi/template.py", line 1145, in _match
content = list(content)
File "/home/trac/Projects/genshi/trunk/genshi/filters.py", line 313, in __call__
for kind, data, pos in stream:
File "/home/trac/Projects/genshi/trunk/genshi/template.py", line 1120, in _match
for event in stream:
File "/home/trac/Projects/genshi/trunk/genshi/template.py", line 1109, in _strip
event = stream.next()
File "/home/trac/Projects/genshi/trunk/genshi/template.py", line 930, in _eval
result = data.evaluate(ctxt)
File "/home/trac/Projects/genshi/trunk/genshi/eval.py", line 101, in evaluate
{'data': data})
File "/home/trac/Projects/trac/trunk/templates/error.html", line 148, in <Expression u"shorten_line(repr(value))">
<td><code>${shorten_line(repr(value))}</code></td>
MemoryError
rendering the site more or less unusable and putting quite a load on the server.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


