
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
[EMAIL PROTECTED] (CainMosni) wrote in message news:<[EMAIL PROTECTED]>...
> we are using berkeley db as a user storage. Multiple threads are writing and
> reading from the database which is not using a environment. The database is
> opened DB_DIRTY_READ | DB_CREATE | DB_THREAD and the put/syncs are locked
> using a mutex, reading is not locked while put/sync ... I guess that the
> DB does that by itself.
>
> Everything is running fine besides the fact that once a week one of the
> 10 DBs stops working with the exception "RUN_RECOVERY". Because we are
> not using any DB Environment and transactions I can not use db_recover
> to recover the database.
>
> Is there anything I can do to avoid the crashing dbs or a way to recover
> such a db ?
My guess is there is a case where a thread of control writing
the database is running at the same time another thread of
control is reading or writing the database. That is generally
the cause of this kind of corruption.
To get more information about the problem, you should turn on
verbose error messages. The Berkeley DB library optionally
outputs a verbose error message whenever it is about to return
a general-purpose error, or throw a non-specific exception.
Whenever it is not clear why an application call into Berkeley
DB is failing, the first step is always to turn on verbose error
messages, which will almost always explain the problem. For
more information on verbose error messages, see the "Run-time
error information" section of the Berkeley DB Reference Guide,
included in your download package and also available at:
http://www.sleepycat.com/docs/ref/debug/runtime.html
You might also want to run the db_verify utility against your
databases when you next see this failure, to verify that the
databases have or have not been corrupted.
Finally, you can recover corrupted databases using the -R and
-r options of the db_dump utility. These options salvage the
database and dump it out in the standard Berkeley DB text dump
format.
For db_dump and db_verify documentation, see the documentation
of your downloaded Berkeley DB distribution, or:
http://www.sleepycat.com/docs/utility/index.html
Regards,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic [EMAIL PROTECTED]
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
| <-- __Chronological__ --> | <-- __Thread__ --> |