Database – Firebird database corruption causes

corruptiondatabasedatabase-performancefirebird

I am running several different Firebird versions (2.0, 2.1) on multiple entry level Windows-based servers with wildly varying hardware. The only matching thing between them is that they are running same home built application with the same database structure.

Lately I've been seeing massive slowdowns on multiple servers. Turns out that database gets corrupted, so each time it breaks, I get to mend, backup and restore the database, and it all is fine for some time (1-2 weeks), and then it repeats once again. Thankfully, I haven't seen any data loss or damage… yet. The thing is that every such downtime results in lost productivity, and often quite some driving for me as some of the databases are in remote locations.

I've been trying to find out what's causing the corruption, but I haven't been able to. The fact that it's running on different hardware hints that it should not be a hardware based problem.

If we rule out hardware issues, I have a bad feeling that it's a bug in Firebird as I'm not doing anything fancy via SQL. Do you have any idea how to find out exactly what's causing the corruption and hopefully fix the problem?

[edit] According to first reply: I get several different problems in firebird.log:

INET/inet_error: read errno = 10054
INET/inet_error: select in packet_receive errno = 10038
Relation has 12 orphan backversions (5 in use) in table LIMITAI (139)
Index 1 is corrupt on page 61700 level 1. File: ..\..\..\src\jrd\validation.cpp, line: 1659 (repeats for multiple pages and index numbers)
Page 50801 is an orphan (repeats for multiple pages)

Best Answer

Check firebird.log. It may contain important information on what's going wrong.
Check how your application handles transactions. Firebird does not like long-running transactions. They result is slowdowns and ultimately (depending on load, etc) server crashes .

For the performance issues I recommend SinĂ¡tica Monitor.

hth

Related Topic