I am facing a very strange error "failed to enter the lock within timeout" . because of this error my website fails silently. i am using umbraco version 7.2.5. it is running over IIS v8. Please note i have not changed any config settings or any other thing and strangely my website goes down, and now i am not able to recover from this. any help will be highly appreciated.
This is a known issue in that specific version of Umbraco - According to this issue http://issues.umbraco.org/issue/U4-6626 it should be fixed in version 7.2.6 so an upgrade should be fixing it.
shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.getStackTrace()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand()
at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
at System.Web.HttpRuntime.AppDomainShutdownTimerCallback(Object state)
at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback()
2016-06-21 08:16:51,692 [P34084/D11/T6] INFO umbraco.content - Save Xml to file...
2016-06-21 08:16:51,817 [P34084/D11/T13] INFO umbraco.content - Saved Xml to file.
2016-06-21 08:16:51,942 [P34084/D14/T1] INFO Umbraco.Core.CoreBootManager - Umbraco 7.4.1 application starting on APSEP8277
2016-06-21 08:16:51,942 [P34084/D14/T1] INFO Umbraco.Core.PluginManager - Determining hash of code files on disk
2016-06-21 08:16:51,958 [P34084/D14/T1] INFO Umbraco.Core.PluginManager - Hash determined (took 7ms)
2016-06-21 08:17:26,411 [P34084/D11/T34] INFO umbraco.content - Save Xml to file...
2016-06-21 08:17:26,568 [P34084/D11/T52] INFO umbraco.content - Saved Xml to file.
2016-06-21 08:17:58,584 [P34084/D11/T54] INFO umbraco.content - Save Xml to file...
2016-06-21 08:17:58,662 [P34084/D11/T44] INFO umbraco.content - Saved Xml to file.
2016-06-21 08:18:21,991 [P34084/D14/T1] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.TimeoutException: Failed to enter the lock within timeout.
at Umbraco.Core.AsyncLock.Lock(Int32 millisecondsTimeout)
at Umbraco.Core.MainDom.Acquire()
at Umbraco.Core.ApplicationContext.Init()
at Umbraco.Core.ApplicationContext..ctor(DatabaseContext dbContext, ServiceContext serviceContext, CacheHelper cache, ProfilingLogger logger)
at Umbraco.Core.CoreBootManager.CreateApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext)
at Umbraco.Core.CoreBootManager.Initialize()
at Umbraco.Web.WebBootManager.Initialize()
at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)
2016-06-21 08:18:32,022 [P34084/D11/T72] INFO umbraco.content - Save Xml to file...
2016-06-21 08:18:32,100 [P34084/D11/T37] INFO umbraco.content - Saved Xml to file.
2016-06-21 08:18:43,210 [P34084/D15/T78] INFO Umbraco.Core.CoreBootManager - Umbraco 7.4.1 application starting on APSEP8277
2016-06-21 08:18:43,226 [P34084/D15/T78] INFO Umbraco.Core.PluginManager - Determining hash of code files on disk
2016-06-21 08:18:43,226 [P34084/D15/T78] INFO Umbraco.Core.PluginManager - Hash determined (took 5ms)
2016-06-21 08:19:02,054 [P34084/D14/T72] INFO Umbraco.Core.UmbracoApplicationBase - Application shutdown. Details: InitializationError
Experiencing this on 7.5.4 as well. Site goes YSOD approx once per week. No ideas on how to fix. Have you had luck with your steps above (32 bit and disable overlap?)
Now that's concerning. Here I was googling away for a site on 7.3.8 and I presumed it to be an Umbraco 7 issue. First i've heard of it occuring on Umbraco 8 with SQL vs what I presume to be MySQL databases.
My initial thoughts are that our sites and databases are too large. Not a particularly common error but happens rarely when the app pool is recycled.
We've recently changed our app pool to have a memory maximum to prevent the site crashing and maybe 5% of the time this error happens.
We're going to perform some maintenance on the database to prune old version history (Over 6 years worth) which will save upwards of 50% table sizes so hope this solves it for us....
Pruning database had a next to zero impact on this error. It's memory related rather than database.
Ultimately, the way I see it you've got one of two directions:
1) Improve server / site resources so it has more memory.
2) Improve the site's performance by reducing memory usage. Use Lucene searches where you can, etc.
Obviously 1 might out your hands or just not an option. Was for us. So we had to sit down and do option 2. A lot of analysis. After a couple months of optimising the website we now see this error from perhaps 2-7 times a day to about once a month. If at all. Stripped back the macros on homepage going for a more simplistic style, stripped back a few of the more high traffic pages, etc.
This is for a site with about 1000 visits a day mind you.
failed to enter the lock within timeout
I am facing a very strange error "failed to enter the lock within timeout" . because of this error my website fails silently. i am using umbraco version 7.2.5. it is running over IIS v8. Please note i have not changed any config settings or any other thing and strangely my website goes down, and now i am not able to recover from this. any help will be highly appreciated.
Hi Shobhit
This is a known issue in that specific version of Umbraco - According to this issue http://issues.umbraco.org/issue/U4-6626 it should be fixed in version 7.2.6 so an upgrade should be fixing it.
If you need a quick fix you should be follow the advice from the post marked as the solution in this post https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/66447-web-site-fails-silently - However you'll need to upgrade to avoid this from happening again permanently.
You can read more about upgrading here https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/ - Make sure to make a backup of everything before doing so (Files and DB) so you're not lost if something does not turn out right in the process.
Hope this helps.
/Jan
Anyone still having this issue? I am running v7.4.1 and I am still getting this error approximately every 30mins on a live site.
Follwing actions has been taken to resolve this:
I am running out of ideas now, considering that I am running v7.4.1 that this issue may have been fixed.
Any help/suggestion will be much appreciated.
_shutDownMessage=Initialization Error HostingEnvironment initiated shutdown HostingEnvironment caused shutdown
shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.getStackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand() at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace) at System.Web.HttpRuntime.AppDomainShutdownTimerCallback(Object state) at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers() at System.Threading.TimerQueue.AppDomainTimerCallback() 2016-06-21 08:16:51,692 [P34084/D11/T6] INFO umbraco.content - Save Xml to file... 2016-06-21 08:16:51,817 [P34084/D11/T13] INFO umbraco.content - Saved Xml to file. 2016-06-21 08:16:51,942 [P34084/D14/T1] INFO Umbraco.Core.CoreBootManager - Umbraco 7.4.1 application starting on APSEP8277 2016-06-21 08:16:51,942 [P34084/D14/T1] INFO Umbraco.Core.PluginManager - Determining hash of code files on disk 2016-06-21 08:16:51,958 [P34084/D14/T1] INFO Umbraco.Core.PluginManager - Hash determined (took 7ms) 2016-06-21 08:17:26,411 [P34084/D11/T34] INFO umbraco.content - Save Xml to file... 2016-06-21 08:17:26,568 [P34084/D11/T52] INFO umbraco.content - Saved Xml to file. 2016-06-21 08:17:58,584 [P34084/D11/T54] INFO umbraco.content - Save Xml to file... 2016-06-21 08:17:58,662 [P34084/D11/T44] INFO umbraco.content - Saved Xml to file. 2016-06-21 08:18:21,991 [P34084/D14/T1] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred System.TimeoutException: Failed to enter the lock within timeout. at Umbraco.Core.AsyncLock.Lock(Int32 millisecondsTimeout) at Umbraco.Core.MainDom.Acquire() at Umbraco.Core.ApplicationContext.Init() at Umbraco.Core.ApplicationContext..ctor(DatabaseContext dbContext, ServiceContext serviceContext, CacheHelper cache, ProfilingLogger logger) at Umbraco.Core.CoreBootManager.CreateApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext) at Umbraco.Core.CoreBootManager.Initialize() at Umbraco.Web.WebBootManager.Initialize() at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) 2016-06-21 08:18:32,022 [P34084/D11/T72] INFO umbraco.content - Save Xml to file... 2016-06-21 08:18:32,100 [P34084/D11/T37] INFO umbraco.content - Saved Xml to file. 2016-06-21 08:18:43,210 [P34084/D15/T78] INFO Umbraco.Core.CoreBootManager - Umbraco 7.4.1 application starting on APSEP8277 2016-06-21 08:18:43,226 [P34084/D15/T78] INFO Umbraco.Core.PluginManager - Determining hash of code files on disk 2016-06-21 08:18:43,226 [P34084/D15/T78] INFO Umbraco.Core.PluginManager - Hash determined (took 5ms) 2016-06-21 08:19:02,054 [P34084/D14/T72] INFO Umbraco.Core.UmbracoApplicationBase - Application shutdown. Details: InitializationError
Experiencing this on 7.5.4 as well. Site goes YSOD approx once per week. No ideas on how to fix. Have you had luck with your steps above (32 bit and disable overlap?)
Getting the same on Umbraco 8.2.3.
Now that's concerning. Here I was googling away for a site on 7.3.8 and I presumed it to be an Umbraco 7 issue. First i've heard of it occuring on Umbraco 8 with SQL vs what I presume to be MySQL databases.
My initial thoughts are that our sites and databases are too large. Not a particularly common error but happens rarely when the app pool is recycled.
We've recently changed our app pool to have a memory maximum to prevent the site crashing and maybe 5% of the time this error happens.
We're going to perform some maintenance on the database to prune old version history (Over 6 years worth) which will save upwards of 50% table sizes so hope this solves it for us....
@Ryan Does your actions help?
This problem is still happening on v7.15+, no idea on the solution
Pruning database had a next to zero impact on this error. It's memory related rather than database. Ultimately, the way I see it you've got one of two directions:
1) Improve server / site resources so it has more memory.
2) Improve the site's performance by reducing memory usage. Use Lucene searches where you can, etc.
Obviously 1 might out your hands or just not an option. Was for us. So we had to sit down and do option 2. A lot of analysis. After a couple months of optimising the website we now see this error from perhaps 2-7 times a day to about once a month. If at all. Stripped back the macros on homepage going for a more simplistic style, stripped back a few of the more high traffic pages, etc.
This is for a site with about 1000 visits a day mind you.
Thanks @RyanW for the valuable direction with real experience!
is working on a reply...