7

The following error is intermittently thrown when attempting to add or update a document: "Microsoft.Isam.Esent.Interop.EsentOutOfLongValueIDsException: Long-value ID counter has reached maximum value. (perform offline defrag to reclaim free/unused LongValueIDs)"

I've attempted to perform this offline defrag according to https://ravendb.net/docs/article-page/3.5/csharp/users-issues/recovering-from-esent-errors. I stopped the RavenDB service, navigated to the Databases folder in Adminstator command prompt and ran "esentutl /d DatabaseName". I then get the following error: "Access to source database 'DatabaseName' failed with Jet error -1032. Operation terminated with wrror -1032 after 20.31 seconds." I have also tried to restart the server with RavenDB not set to start on start-up. I still get error -1032 when attempting to defrag.

Is performing the defrag operation the correct action? If so, what process(es) would I need to stop in order for those files to not be in use?

Thanks!

Varuna
  • 125
  • 1
  • 9
  • 2
    There is a limit of 2 Billion Long Values. It's an auto-inc number, so deleting old values doesn't help. The offline defrag is the only way to fix it, as you discovered. – Martin Chisholm Jun 13 '17 at 19:31

1 Answers1

1

The solution was to run compact on raven. Raven studio > Manage Your Server > Compact. Compacting takes the database down, so I performed it on the replicated servers one at a time.

Varuna
  • 125
  • 1
  • 9