Opened 17 years ago

Last modified 2 years ago

#6 assigned defect

MemoryError in Browser

Reported by: Thomas Moschny Owned by: Thomas Moschny
Priority: major Component: tracmtn
Version: Keywords:
Cc:

Description

This error only occurs when using the bsddb caching method.

After running a while, Trac dies with this error:

MemoryError: (12, 'Cannot allocate memory -- Lock table is out of
available locker entries')

Change History (4)

comment:1 by Thomas Moschny, 17 years ago

Status: newassigned
Summary: !MemoryError in BrowserMemoryError in Browser

This is a known bug in the cache system. The BSD DB environment is not closed correctly, and keeps ressources allocated for each "open" connection. The total amount of "open" connection is limited however, and when the limit is reached, the said error is thrown.

Proper fixing needs a patch on the trac side, too: See http://trac.edgewall.org/ticket/4972.

comment:2 by Thomas Moschny, 17 years ago

A workaround, until this get fixed, is to clear the cache directory's contents.

comment:3 by Thomas Moschny, 17 years ago

See also http://trac.edgewall.org/ticket/5010 for the general problem of freeing ressources allocated by trac plugins.

comment:4 by Thomas Moschny, 16 years ago

Tried to fix that in 9bcaf1f668aa7bed82e1bcd94707614fdc92b87c, please test.

The number of current locks can be seen with the db_stat command, using the -c switch:

# db4.6_stat -c -h /var/cache/trac
...
0       Number of current locks
6       Maximum number of locks at any one time
0       Number of current lockers
10      Maximum number of lockers at any one time
0       Number of current lock objects
6       Maximum number of lock objects at any one time
272     Total number of locks requested
272     Total number of locks released
...
Note: See TracTickets for help on using tickets.