February 21st, 2013, 08:11 AM
Firebird database corrupted after reaching 2GB
Our main Firebird database seemed to become corrupted this morning after its file size reach 2GB.
Does anyone have any advice on how large to let the database grow before considering splitting it across multiple files?
I'm wondering how large to make each file and if there are any performance differences between a single file and multiple files?
Unfortunatly we run this on 32bit Windows XP (NTFS). The reason for this is that we have other software that is limited to this platform that needs high data thoughput with our Firebird database.
oh, we run Firebird 2.5 superserver with about 80 connections.
February 22nd, 2013, 01:02 AM
I know absolutely nothing about Firebird; however, 2147483647 is the largest number that can be represented by a signed 32-bit integer. 2147483647 bytes is approximately 2GB.
NTFS does not have a maximum filesize of 2GB, even on a 32-bit system. So the problem with corruption is probably caused by Firebird directly. This would tend to imply that internally it is using a signed 32-bit integer to represent a position within the file. That is something you cannot change except by upgrading to a 64-bit version of Firebird, which cannot run on a 32-bit OS.
If Firebird supports splitting a database into multiple files that might solve the problem, provided that internally all of its pointers are relative to the individual files and not the database as a whole. In that case, 2147483647 bytes is theoretically the maximum size for any one database file, but in practice you would probably want to decrease that a bit to have some extra wiggle room.
February 22nd, 2013, 02:34 AM
Firebird does have support for 64bit IO for windows from version 1.0
Are you sure that is not a FAT partition ? because Firebird does have support for 64bit IO for windows from version 1.0
Originally Posted by srayner
Also what is the error log for firebird ?
February 25th, 2013, 07:17 AM
I'm working with databases larger than 2gb on 32 bits Windows and teere are no problems with them.
March 6th, 2013, 03:54 AM
Only thing in the log is
Originally Posted by mariuz
TSC001 (Server) Thu Feb 21 09:21:51 2013
INET/inet_error: read errno = 10054
We see these errors quite a bit, sometime two or three times a day, then sometimes we don't see any for several weeks.
After backup and restore the database is currently at 1.3GB and growing. I could just leave it and see if it has the same problem when it reaches 2GB again.