In article <a2d32c48.0308191800.71f68157 (AT) posting (DOT) google.com>,
pgiorgilli (AT) theage (DOT) fairfax.com.au (Peter Giorgilli) writes:
Quote:
1. Should I change the database configuration and increase the size of
the lock memory region from the default 360KB? |
I wonder if changing the values of set_lk_max_lockers, set_lk_max_locks,
and set_lk_max_objects would be helpful in this case? I searched
BerkeleyDB.pm and BerkeleyDB.xs and did not find any way to set these
from perl. Maybe Paul can comment on whether or not there is a way, or
even a need to do this?
I think that the default values for these are like 1000 or so. Do
you think that you had that many locks at the time? Actually, I'm not
100% sure how the values for set_lk_max_xxx map to actual locks?
Quote:
2. Would I be best advised to "delete" the database environment
periodically, say once a week? |
That is a question that I would like to know the answer to as well. Is
it adequate simply to close down the environment and start a new one to
release any 'leaked' resources, or are more drastic measures needed. Is
it neccessary for every process that owns an environment to close it down,
or can they be closed and reopened on a process by process basis so that
the clients don't know the difference?
Also, I would think that it would be possible to detect a memory leak by
using something like MRTG to plot a particular process' core image size in
time. Ideally, it should reach some nominal value and fluctuate thereabouts.
If it is not asymptotic, but rather continues to grow over time ad infinitum,
then that would indicate a memory leak? I have not tried this, but it might
be nice to know.
Restarting the server code periodically might be a nice safeguard against this
if it could be done without interruption to the clients.
/Nathan.