Csongor Fagyal wrote:
Hi guys,

I am having a re-occuring but random error. We have a few sites using Apache::ASP, and all of them randomly produce an "Internal Server Error". After refreshing, the error message disappears (then comes up again later).

In the log, I can see the following:
MLDBM error: Second level tie failed, "File exists" at /usr/lib/perl5/site_perl/5.8.0/MLDBM/Sync.pm line 214

The short of it is that I do not know what the problem is, but
have some things for you to check & try below...

The way in which file locking is handled should prevent things
of this nature happening.  Also the way in which MLDBM is initialized
with a call like:

  	$self->{dbm} = &MLDBM::Sync::TIEHASH('MLDBM', $self->{file}, O_RDWR|O_CREAT, $self->{file_perms});

should make things like "file exists" be a non-issue because
O_RDWR|O_CREAT flags.  The O_RDWR part in particular should make
it so that even if the dbm has already been created, retying
to it should not be a problem.

Things I would suspect here are:

  ) if StateDir is pointed at a network file system, that
    file system does not support flock() semantics correctly
    Try pointing StateDir to a local file system.

  ) if multiple web servers have used the same StateDir, then
    they may have been run under different users, creating file
    permissions problems.  Make sure to have web servers running
    with the same user name/permissions accessing StateDir

  ) if StateDB has been getting changed, then delete StateDir
    entirely, and keep your StateDB setting the same.  This might
    be an error from having mixed dbm formats in the same directory.

I have tried using Data::Dumper instead of Storable, also tried DB_File, but the same thing occures again and again. Anybody seen something similar? What can I do?

If nothing else works, you might try StateDB setting of Tie::TextDir.
This is an entirely different file storage system than dbms, and might
not have the same problem for you.  Note, again, you must delete
StateDir before trying this setting.

I would appreciate knowing what the resolution is if you find
out the problem.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to