Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Dealing with corrupt db_file files

by gossamer (Sexton)
on Jan 17, 2013 at 01:18 UTC ( [id://1013671]=note: print w/replies, xml ) Need Help??


in reply to Re: Dealing with corrupt db_file files
in thread Dealing with corrupt db_file files

> When calling keys %hash, you load all keys in memory at once. This can take quite some time if your database is not small. Are you sure your programm hangs dead? How long have you been waiting? Maybe a look at a process watcher such as top could help.

No, I'm sure the process is hung. I've let it sit overnight.

It only happens once every few weeks. Rebuilding the corrupt db on the originating server fixes the problem, but the only way to find out I need to do this is after learning my script has been running all night. I then need to isolate which db file it is that's causing the issue, and rebuild that one file.

I will work to try and implement your changes. Do you think that will be better at dealing with corrupt entries in the db file?

Thanks,
Dave
  • Comment on Re^2: Dealing with corrupt db_file files

Replies are listed 'Best First'.
Re^3: Dealing with corrupt db_file files
by grondilu (Friar) on Jan 17, 2013 at 03:07 UTC

    I don't know if using seq will solve the issue then. It's definitely the correct way to access your database sequentially, though.

    I'd also suggest you add some lines to log the execution of your script, so that you can know at which point exactly it hangs.

    Other than that, I don't see much else to do, especially considering it is difficult to reproduce.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1013671]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-25 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found