Preventing Database Idling/Reloading

147 views
Skip to first unread message

Phil Sandler

unread,
Jun 26, 2015, 10:51:27 AM6/26/15
to rav...@googlegroups.com
Server build 2956, running as a Windows Service.

We've encountered the following error a few times from our application code:

The database MyDatabase is currently being loaded, but there are too many requests waiting for database load. Please try again later, database loading continues.

We didn't know of any reason why the database would be loading.  After a bit more digging, we found the following in the event log, with source ESENT:

The database engine stopped the instance

Did a little reading here, and it sounds like the database will be stopped if it idles for long enough.

My question: is it possible to completely disable this idle shutdown/unload?


Thanks,

Phil

Federico Lois

unread,
Jun 26, 2015, 5:03:02 PM6/26/15
to rav...@googlegroups.com
AFAIK there is no switch to disable, but the default is 900 seconds. You can set it as high as you want for a particular tenant with the configuration switch: "Raven/Tenants/MaxIdleTimeForTenantDatabase" or for all tenants on the Raven.Server.config file. A big enough value will do the trick.

Federico

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Sandler

unread,
Jun 29, 2015, 11:32:16 AM6/29/15
to rav...@googlegroups.com
Excellent, thanks Federico.

Phil Sandler

unread,
Jul 15, 2015, 2:57:17 PM7/15/15
to rav...@googlegroups.com
I added this to the server config file about 2-3 weeks ago:

<add key="Raven/Tenants/MaxIdleTimeForTenantDatabase" value="2147483647" />

However I got this error in one environment today (for the first time since making that change):

The database XXXXX is currently being loaded, but there are too many requests waiting for database load. Please try again later, database loading continues.


The database could not have been idle for more than a few hours.  The server wasn't rebooted and the Raven service wasn't restarted.


Also, I did not see the ESENT event in the event log that is usually present when a database is shut down:


The database engine stopped the instance


Any other reason why the database may need to reload?



On Friday, June 26, 2015 at 4:03:02 PM UTC-5, Federico Lois wrote:

Oren Eini (Ayende Rahien)

unread,
Jul 16, 2015, 12:04:08 AM7/16/15
to ravendb
Not according to the information you give.
The event viewer should tell us about all esent activity, though.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 

Reply all
Reply to author
Forward
0 new messages