[mod_python] python_cleanup/bsddb error

Krishna Srinivasan krishna at ironport.com
Tue Jul 20 13:24:26 EDT 2004


Greetings.

> Can you post more details on how you register the cleanup etc, any 
> reasons why it might be giving an invalid argument?

I don't do anything special at all - I just set up
the CLEANUP_CHANCE and that's it. Mod_Python is supposed
to be triggering the cleanup every time the CLEANUP_CHANCE
probability is hit.

I checked the permissions on '/tmp/mp_sess.dbm' file and
they are "-rw-r--r--" and owned by user "nobody" (same as
apache) and group "wheel" (std in freebsd). So I am assuming
that if 'nobody' can create and write to this file, it should
also be able to 'write' again (to delete some old stuff).

Any suggestions, help, please ? This memory problem is
really terrible. Whenever my temp file goes over 25 megs,
I have to wipe out that file and restart the server.
But this also means that I trouble all users of my application
to save all changes and not keep anything in session before
I do this wipe-out over a weekend.

Many thanks,
Krishna.




David wrote:

> Hi
> 
> I'm not sure of this, but sometimes the cleanup functions give an error 
> because they end up getting run in restricted mode.
> But in this case the error message posted is here:
> 
> > [Thu Jul 12 19:27:04 2004] [error] [client 10.1.1.67] python_cleanup: 
> > Error calling cleanup object <function dbm_cleanup at 0x823fc8c>, 
> > referer: http://mymachine/home
> > [Thu Jul 12 19:27:04 2004] [error] [client 10.1.1.67] bsddb.error: 
> > (22, 'Invalid argument'), referer: http://mymachine/home
> 
> Can you post more details on how you register the cleanup etc, any 
> reasons why it might be giving an invalid argument?

> David

Krishna Srinivasan wrote:

>
> Greetings.
>
> Can some one please help me with this ?
>
> The /tmp/mp_sess.dbm is just growing
> with time and doesn't get cleaned
> up at all. Please atleast let me know
> if this is NOT a mod_python error or
> some dbm-module error, so I can investigate
> further as to what is wrong.
>
> Thanks,
> Krishna.
>
>
> ---------- Forwarded message ----------
> Date: Tue, 13 Jul 2004 16:33:19 -0700 (PDT)
> From: Krishna Srinivasan <krishna at ironport.com>
> To: Modpython <Mod_python at modpython.org>
> Subject: python_cleanup/bsddb error
>
>
> Greetings.
>
> I get the following errors in my error_log.
> I guess this is why my sessions don't get
> cleaned up at all and hence the mp_sess.dbm
> in /tmp is always growing.
>
> [Thu Jul 12 19:27:04 2004] [notice] [client 10.1.1.67] DbmSession: 
> registered database cleanup., referer: http://mymachine/home
> [Thu Jul 12 19:27:04 2004] [error] [client 10.1.1.67] python_cleanup: 
> Error calling cleanup object <function dbm_cleanup at 0x823fc8c>, 
> referer: http://mymachine/home
> [Thu Jul 12 19:27:04 2004] [error] [client 10.1.1.67] bsddb.error: 
> (22, 'Invalid argument'), referer: http://mymachine/home
>
> Can someone please give me pointers as to
> how to correctly clean up the db ?
>
> Many thanks,
> Krishna.



More information about the Mod_python mailing list