"file size not a multiple of the pagesize" error while reading from queue
686822Apr 1 2009 — edited Apr 1 2009I have a strange problem and need an advice about sharing a queue between two processes.
I have a DbEnv and Db open in each process. One of them Db::put() elements into queue (and flush dirty pages in separated thread). Second process consumes records without waiting using Db::get(..., DB_CONSUME).
I sometime got errors like:
shqueue0/__dbq.queue.db.7599: file size not a multiple of the pagesize
Db::get: Invalid argument
shqueue0/__dbq.queue.db.7625: file size not a multiple of the pagesize
Db::get: Invalid argument
shqueue0/__dbq.queue.db.7637: file size not a multiple of the pagesize
Db::get: Invalid argument
I set database page to 64k. It might be important.
Currently I workaround this problem closing and reopening database each time problem occur, but I'm looking for better solution. Any ideas?