Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Vainer 15 posts 96 karma points
    Sep 09, 2022 @ 21:56
    David Vainer
    1

    Umbraco 8.18.5 - Lock request time out period exceeded

    Hey, I recently upgraded my Umbraco 8 application from 8.2.2 to 8.18.5.
    After the upgrade an issue of Lock request time out period exceeded exception began to appear often.
    Most of the time it happens after a few Umbraco operations, like publishing, copying, deleting etc.
    Once the exception appears once, it appears in every Umbraco action you try to do after that.
    The only way to solve it is to IISRESET / Restart the SQL Server.
    I've tried solutions like setting Umbraco.Core.SqlWriteLockTimeOut to a higher value like 20 seconds, but it seems to have a minor effect.

    It really became impossible to work with Umbraco; Luckily it's not in Prod environment yet. Has someone faced and solved this issue?
    Thanks a lot!

    • Load balanced environment with one Master server and one Front server, AWS EC2 instances.
    • Using AWS RDS.

    {"Message":"An error has occurred.","ExceptionMessage":"Lock request time out period exceeded.\r\nThe statement has been terminated.","ExceptionType":"System.Data.SqlClient.SqlException","StackTrace":" at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)\r\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) in D:\a\1\s\src\Umbraco.Core\Persistence\FaultHandling\RetryPolicy.cs:line 172\r\n at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\n at Umbraco.Core.Persistence.SqlSyntax.SqlServerSyntaxProvider.ObtainWriteLock(IDatabase db, TimeSpan timeout, Int32 lockId) in D:\a\1\s\src\Umbraco.Core\Persistence\SqlSyntax\SqlServerSyntaxProvider.cs:line 285\r\n at Umbraco.Core.Persistence.SqlSyntax.SqlServerSyntaxProvider.WriteLock(IDatabase db, Int32[] lockIds) in D:\a\1\s\src\Umbraco.Core\Persistence\SqlSyntax\SqlServerSyntaxProvider.cs:line 278\r\n at Umbraco.Core.Scoping.Scope.LockInner(IUmbracoDatabase db, Guid instanceId, Dictionary2& locks, HashSet1& locksSet, Action2 obtainLock, Action3 obtainLockTimeout, Nullable1 timeout, Int32[] lockIds) in D:\\a\\1\\s\\src\\Umbraco.Core\\Scoping\\Scope.cs:line 956\r\n at Umbraco.Core.Scoping.Scope.EagerWriteLockInner(IUmbracoDatabase db, Guid instanceId, Nullable1 timeout, Int32[] lockIds) in D:\a\1\s\src\Umbraco.Core\Scoping\Scope.cs:line 910\r\n at Umbraco.Core.Scoping.Scope.EnsureDbLocks() in D:\a\1\s\src\Umbraco.Core\Scoping\Scope.cs:line 471\r\n at Umbraco.Core.Scoping.Scope.getDatabase() in D:\a\1\s\src\Umbraco.Core\Scoping\Scope.cs:line 330\r\n at Umbraco.Core.Scoping.Scope.getDatabase() in D:\a\1\s\src\Umbraco.Core\Scoping\Scope.cs:line 332\r\n at Umbraco.Core.Persistence.Repositories.Implement.DocumentRepository.IsPathPublished(IContent content) in D:\a\1\s\src\Umbraco.Core\Persistence\Repositories\Implement\DocumentRepository.cs:line 918\r\n at Umbraco.Core.Services.Implement.ContentService.IsPathPublished(IContent content) in D:\a\1\s\src\Umbraco.Core\Services\Implement\ContentService.cs:line 772\r\n at Umbraco.Core.Services.Implement.ContentService.StrategyCanPublish(IScope scope, IContent content, Boolean checkPath, IReadOnlyList1 culturesPublishing, IReadOnlyCollection1 culturesUnpublishing, EventMessages evtMsgs, ContentSavingEventArgs savingEventArgs, IReadOnlyCollection1 allLangs) in D:\\a\\1\\s\\src\\Umbraco.Core\\Services\\Implement\\ContentService.cs:line 2763\r\n at Umbraco.Core.Services.Implement.ContentService.CommitDocumentChangesInternal(IScope scope, IContent content, ContentSavingEventArgs saveEventArgs, IReadOnlyCollection1 allLangs, Int32 userId, Boolean raiseEvents, Boolean branchOne, Boolean branchRoot) in D:\a\1\s\src\Umbraco.Core\Services\Implement\ContentService.cs:line 1174\r\n at Umbraco.Core.Services.Implement.ContentService.SaveAndPublish(IContent content, String culture, Int32 userId, Boolean raiseEvents) in D:\a\1\s\src\Umbraco.Core\Services\Implement\ContentService.cs:line 930\r\n at Umbraco.Web.Editors.ContentController.PublishInternal(ContentItemSave contentItem, String defaultCulture, String cultureForInvariantErrors, Boolean& wasCancelled, String[]& successfulCultures) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 1365\r\n at Umbraco.Web.Editors.ContentController.PostSaveInternal(ContentItemSave contentItem, Func2 saveMethod, Func2 mapToDisplay) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 867\r\n at lambdamethod(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass62.

  • David Vainer 15 posts 96 karma points
    Sep 13, 2022 @ 14:30
    David Vainer
    0

    Any help please?

  • Lennard Fonteijn 17 posts 73 karma points MVP 5x
    Feb 02, 2023 @ 17:55
    Lennard Fonteijn
    0

    Hey David,

    Did you ever find a solution? We are in a similar situation where this constantly happens on v8. No matter how much resources your DB has...

  • David Vainer 15 posts 96 karma points
    Feb 06, 2023 @ 17:54
    David Vainer
    0

    Unfortunately, not. We decided to stay on our current v8 version without upgrading.

Please Sign in or register to post replies

Write your reply to:

Draft