Loading ...
Sorry, an error occurred while loading the content.

Re: Second level tie failed

Expand Messages
  • Csongor Fagyal
    ... Hi, I have managed to solve this problem, thanks to your help. ... It is a local statedir. ... Not this one, either. However, this problem arised after we
    Message 1 of 3 , Dec 10, 2002
      >> 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

      I have managed to solve this problem, thanks to your help.

      > 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.

      It is a local statedir.

      > ) 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

      Not this one, either.
      However, this problem arised after we have reinstalled the server, and
      moved all user homes to the new hard disk. It was a cp -a, so it should
      not have been a problem, yet it looks like something got damaged during
      the copy. The strange thing is that the mentioned error only occured at
      some sites, randomly, and not very frequently (but repeatedly).

      > ) 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.

      Well, I have changed the StateDB after I have encountered this problem.

      >> 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.

      Actually I have simply deleted statedir according to your suggestion,
      and now it looks like everything works. I don't think it was a
      permission error... but who knows, after a full reinstall :-). Maybe at
      some time Apache got restarted in a way it shouldn't have. (Or do file
      timestamps matter?)

      - Csongor

      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.