Subject | Re: DROP table statement hangs Firebird Server process with 100% CPU usage |
---|---|
Author | |
Post date | 2018-06-19T09:39:06Z |
Ah, indeed I have a LOT of orphaned pages! Didn't occur to me to check the logs. Sorry about that.
---In firebird-support@yahoogroups.com, <hvlad@...> wrote :
First entries during last validation:
hostname (Server) Mon Jun 18 18:46:38 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Relation has 4 orphan backversions (0 in use) in table RDB$RELATIONS (6)
hostname (Server) Mon Jun 18 18:46:38 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Relation has 3 orphan backversions (0 in use) in table RDB$PROCEDURES (26)
hostname (Server) Mon Jun 18 18:49:15 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Index 2 misses node on page 2905887 level 1 in table BLOGS (128)
hostname (Server) Mon Jun 18 18:49:15 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Index 2 has inconsistent left sibling pointer, page 2905887 level 1 in table BLOGS (128)
hostname (Server) Mon Jun 18 18:50:02 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Relation has 2 orphan backversions (1 in use) in table BLOGS (128)
hostname (Server) Mon Jun 18 19:24:49 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Index 1 misses node on page 156755 level 1 in table URLS (131)
hostname (Server) Mon Jun 18 19:24:49 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Index 1 has inconsistent left sibling pointer, page 156755 level 1 in table URLS (131)
And here are the last 3 lines of the thousands of orphan entries:
hostname (Server) Mon Jun 18 19:37:20 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Page 4808475 is an orphan
hostname (Server) Mon Jun 18 19:37:20 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Page 4808844 is an orphan
hostname (Server) Mon Jun 18 19:37:20 2018
Database: /mnt/volume_fra1_01/my_db.fdb
Page 4809288 is an orphan
I don't see other type of error.
I'm trying to figure out why there are so many orphaned pages.
I use the python firebird driver to manipulate the database, and often I do this (pseudo code):
cursor = connection.cursor()
for item in list:
try:
cursor.execute(sql_statement, (item,))
except fdb.DatabaseError:
log("Exception: duplicate found in database for item")
continue
finally:
con.commit()
Here, I only commit after multiple execute statements, some of which could have raised an exception in the Firebird server. That could be the reason maybe? Perhaps I do need to commit after an exception has been raised in firebird, otherwise that generates an orphan page?
I'm a bit puzzled by the other errors and what could have caused them. Or perhaps I'm no closing my connections to the database consistently which caused some problems.
Anyway, I'm going a bit off topic here.
---In firebird-support@yahoogroups.com, <hvlad@...> wrote :
Could you send messages by last validation from firebird.log to me ?
Or, if you can - find just 3 record level errors and show it here. I suppose most of 11236 db page errors is
about orphan pages (absolutely harmless, btw)
Regards,
Vlad