http://www.perlmonks.org?node_id=392644


in reply to DB_File size limitations?

If your system can't handle a file over 2Gb then what tilly says is probably going to be your only problem. Berkely DB should be able to handle a database into the terabytes, with key/values limited to 1-2 gigabytes. So realistically you will hit size restrictions on the hard drive before the database.

I created a utility to edit berkely db files and I was experiencing a similar issue. I'd add keys, then try to get a list of keys from 'keys %db' but I wasn't getting new keys, or sometimes I'd get ones that were deleted. Eventually I resolved this by doing a sync.
my $bdb = tie my %db .... $db{'new'} = 'stuff'; $bdb->sync();
Give that a try and see if it helps.

Replies are listed 'Best First'.
Re^2: DB_File size limitations?
by skazat (Chaplain) on Sep 22, 2004 at 01:23 UTC

    That sounds like a great idea; and may relieve my problem. Hopefully I can get it to work on this program, since it's indirectly using the DB_File module via AnyDBM_File. I'm guessing I can wrap this call into a eval(), so if you try to run this code using a different DB file type (other than Berkeley DB) it won't produce an error.

    Still very weird how this is topping out at 10 megs instead of say, 2 gigs. I checked to see if this was an account quota issue (it wasn't)

     

    -justin simoni
    !skazat!