MaxMind-DB-Writer-perl icon indicating copy to clipboard operation
MaxMind-DB-Writer-perl copied to clipboard

Error message when data section exceeds the maximum size is improved (was: Corrupt data when DB is large)

Open ebclark2 opened this issue 6 years ago • 1 comments

I'm running into an issue where the perl reader tells me data is corrupt when trying to read from a database file of 30 gigs I receive decode errors. Reading from a smaller, say 1gig, database works perfectly file. Are there limitations on the size of the database I can create or am I doing something wrong? I am using the same method to create both databases, which is just iterating IPs and adding a single large string value. Test code is attached.

read.pl.txt write.pl.txt

ebclark2 avatar May 08 '19 18:05 ebclark2

The writer and most readers only support a record size of 32 currently. This means the data section will be limited to 4 GB. Ideally, the writer would throw a more meaningful error, but I think it is safe to say a 30 GB database is not currently supported.

oschwald avatar May 08 '19 21:05 oschwald

Closing this as future development is focused on the Go mmdbwriter module.

oschwald avatar Sep 08 '22 14:09 oschwald