fanasy has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have the read/write one DBM database by about 10-20 scripts. the read/write hang on long time . so I kill the process of read/write process by "kill" linux command.
However,I try to re-read/write the same DBM database with same script.
the error out:
DBM::Deep: Cannot allocate transaction ID at
how to solve this ? or my DBM database broken ?
sub writeToDB { say "start to writeToDB"; my $dbName = shift || "LMT.db"; my $pName = shift; my $date= shift; my $hashRef= shift; my $db = DBM::Deep->new( file=> $dbName, num_txns=> 10, ); eval { $db->begin_work; foreach ( keys %$hashRef) { push @{$db->{$pName}->{$date}->{$_}},$hashRef->{$_}; } $db->commit; }; if(defined $@ and length $@) { say $@; $db->rollback; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBM::Deep: Cannot allocate transaction ID
by kcott (Archbishop) on Jan 10, 2021 at 03:41 UTC | |
by fanasy (Sexton) on Jan 10, 2021 at 04:03 UTC | |
by AnomalousMonk (Archbishop) on Jan 10, 2021 at 16:17 UTC | |
|
Re: DBM::Deep: Cannot allocate transaction ID
by fanasy (Sexton) on Jan 11, 2021 at 08:27 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |