Q: Problem with MLDBM 
Author Message
 Q: Problem with MLDBM

I have a smal Perl program, which reads a log file and stores some
data of the log file in a database. It worked fine for a few month,
but now i get the following error message:

ndbm store returned -1, errno 28, key "codegen" at /usr/local/lib/perl5/site_perl/MLDBM.pm line 92, <LOGFILE> chunk 2530.

Part of my code:

snip...

use MLDBM qw(NDBM_File);

snip...

my(%ToolList);
tie(%ToolList, "MLDBM", "$LogDir/Summary", O_RDWR|O_CREAT, 0660);

snip...

   while (<LOGFILE>) {
        my($Tool, $Version, $Time, $User) = split(/; /, $_);
        my($Data) = $ToolList{$Tool};
        if (defined $Data->{$Version}) {
            $Data->{$Version}{'counter'}++;
        }
        else {
            $Data->{$Version}{'counter'} = 1;
        }
        $Data->{$Version}{'time'} = $Time;
        $Data->{$Version}{'user'} = $User;
        $ToolList{$Tool} = $Data;
    }

Errno 28 stands for 'No space left on device' ($!). But i can add a new
tool or extend other tools data with out any problems.
Is there a size limit for each hash element or something like this?

I use perl 5.004_04, MLDBM 1.25 and Data::Dumper 2.081 on a Solaris 2.6 host.

THA
Henri



Sat, 03 Feb 2001 03:00:00 GMT  
 Q: Problem with MLDBM

Quote:

>I have a smal Perl program, which reads a log file and stores some
>data of the log file in a database. It worked fine for a few month,
>but now i get the following error message:

>ndbm store returned -1, errno 28, key "codegen" at /usr/local/lib/perl5/site_perl/MLDBM.pm line 92, <LOGFILE> chunk 2530.

>Part of my code:

>snip...

>use MLDBM qw(NDBM_File);

>snip...

>my(%ToolList);
>tie(%ToolList, "MLDBM", "$LogDir/Summary", O_RDWR|O_CREAT, 0660);

>snip...

>   while (<LOGFILE>) {
>        my($Tool, $Version, $Time, $User) = split(/; /, $_);
>        my($Data) = $ToolList{$Tool};
>        if (defined $Data->{$Version}) {
>            $Data->{$Version}{'counter'}++;
>        }
>        else {
>            $Data->{$Version}{'counter'} = 1;
>        }
>        $Data->{$Version}{'time'} = $Time;
>        $Data->{$Version}{'user'} = $User;
>        $ToolList{$Tool} = $Data;
>    }

>Errno 28 stands for 'No space left on device' ($!). But i can add a new
>tool or extend other tools data with out any problems.
>Is there a size limit for each hash element or something like this?

Yes  -  you get this (misleading) error if you exceed the key+value size
limit.     See  perldoc AnyDBM_File for information on size limits.

Mike Guy



Sat, 03 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problems w/MLDBM

2. problem compiling with MLDBM

3. Problems with MLDBM-modul, databasefile growing with duplicates

4. Problem with MLDBM Module

5. MLDBM Problems

6. Problem with Storable and MLDBM

7. Problem installing MLDBM 2.00

8. PROBLEM: data output w/MLDBM

9. MLDBM Read/Write Problems

10. Problem: MLDBM makes enormous DB files out of little data

11. Problem using MLDBM

12. MLDBM module problem

 

 
Powered by phpBB® Forum Software