Sebastian Araya
2008-Apr-20 18:45 UTC
[Xapian-discuss] Exception DatabaseCorruptError under php
Hello, I'm having a litle issue with Xapian-1.0.6 with php bindings under php5 when trying to add a new document it throws: Fatal error: Uncaught exception 'Exception' with message 'DatabaseCorruptError: Failed to unlink /var/lib/xapian/trade.ar/termlist.baseA: No such file or directory' in /usr/share/php5/xapian.php:1140 Stack trace: #0 /usr/share/php5/xapian.php(1140): writabledatabase_add_document(Resource id #18, Object(XapianDocument)) #1 /home/indexer/CDetails.php(431): XapianWritableDatabase->add_document(Object(XapianDocument)) #2 /home/indexer/CDetails.php(379): CDetails->postDetails('E', '2000-01-07', '001', '-1', '4', '200BA', '225', '19059000390', '2514', 'michael kamen concert for saxophone', 2989378842415107) #3 /home/indexer/Details.php(139): CDetails->index() #4 {main} Curiously, this process run seamless before for more than 16 million iterations, and now stucks after a few thousand... I check for disk issues (there a few hundred of gigabytes free) and swap disks, just in case. This process runs alone: there aren't any other process writting nor reading xapian database; and I've instantiated Xapian object using xapian-bindings with: objXapian = new XapianWritableDatabase( "/var/lib/xapian/trade.ar", DB_CREATE_OR_OPEN ); Actually, /var/lib/xapian/trade.ar is an empty directory. Where else can I check? Thank you, Sebastian
Sebastian Araya
2008-Apr-20 23:33 UTC
[Xapian-discuss] Exception DatabaseCorruptError under php
2008/4/20 Sebastian Araya <cbimax at gmail.com>:> Hello, > > > I'm having a litle issue with Xapian-1.0.6 with php bindings under > php5 when trying to add a new document it throws: > > Fatal error: Uncaught exception 'Exception' with message > 'DatabaseCorruptError: Failed to unlink > /var/lib/xapian/trade.ar/termlist.baseA: No such file or directory' > in /usr/share/php5/xapian.php:1140 > > Stack trace: > #0 /usr/share/php5/xapian.php(1140): > writabledatabase_add_document(Resource id #18, Object(XapianDocument)) > #1 /home/indexer/CDetails.php(431): > XapianWritableDatabase->add_document(Object(XapianDocument)) > #2 /home/indexer/CDetails.php(379): CDetails->postDetails('E', > '2000-01-07', '001', '-1', '4', '200BA', '225', '19059000390', '2514', > 'michael kamen concert for saxophone', 2989378842415107) > #3 /home/indexer/Details.php(139): CDetails->index() > #4 {main}I've found the problem: sadly the object constructor instatiate a XapianWritableDatabase(), and later, a clean up method removes the files from the storage directory (/var/lib/xapian/trade.ar).> Curiously, this process run seamless before for more than 16 million > iterations, and now stucks after a few thousand... I check for disk > issues (there a few hundred of gigabytes free) and swap disks, just in > case. This process runs alone: there aren't any other process writting > nor reading xapian database; and I've instantiated Xapian object using > xapian-bindings with: > > objXapian = new XapianWritableDatabase( "/var/lib/xapian/trade.ar", > DB_CREATE_OR_OPEN ); > > Actually, /var/lib/xapian/trade.ar is an empty directory.I've remove it from the constructor and placed in a later method which is called when the storage directory has been cleaned.> Where else can I check? > > Thank you, > > > Sebastian >Sebastian