Lock request timeout exceeded
# help-with-umbraco
i
Hi all, I have a site that currently cannot publish any node. The error that pops up after like 30 seconds is 'Lock request timout exceeded'. This is quite the critical issue and I cannot find much. This happens on the live as well as the staging. Localhost also comes up with the same error. Can anyone point me in the right direction?
It seems it has to do with SQL, we are running a Azure SQL Elastic pool if that helps
Umbraco is on V8.18 btw
b
are you connecting to same db from multiple locations(local/live) and do you do scaling?
i
We do not scale in Azure, we have had problems with that in the past. I do connect to the staging from both a staging domain behind a web app, and localhost
So staging and localhost both try to connect to the DB
b
so you hard lock your db, you have 2 umbracos connected to same db :), which both try be server 🙂
to fix it close localhost -> clean umbraco key locks from keyvalue storage and restart app 🙂
i
Right. Sounds reasonable. However I must attest that I never come across this in any other site, even local development work is 9/10 times done on the same DB as the live site
Will try, how do I clean the umbraco key locks from keyvalue storage? Which keyvalue storage is that, related to azure web app or in Umbraco itself?
b
@ivodepivo now it is tricky part, depends on your configuration you might need to do that or not, if you used sql locks you find them in db, if you use file ones they usually are expired by restart anyway
in db in umbracoKeyValue you might find Umbraco.Core.Runtime.SqlMainDom-1cadc725ee91ee429dbf079193503abc3e09355e
btw can i ask why idea of sharing db, I see it is quite populate and I cant understand why as it causing a lot issue with really small value especially when usync complete db exists 🤔
i
Frankly, I don't know. I came at this company 3 years ago knowing nothing about Umbraco. I just assumed that is how things worked
I asked a colleague and he said this sql lock errors were more common in v8, but we haven't encountered them ever in u9+
I have like 15 keys with sql main dom in the keyvalue table. Do I just wipe them?
b
yep just remove keys, v9+ use little different system of locks but yeah they still can happen it is why loadbalancing of backoffice is not supported etc 🙂
i
We do have the recommended settings for azure regarding the sqlmaindomlock keys etc. But yeah I think we should look into doing it properly.
Even if we don't load balance in Azure itself, like you said we kinda do it by sharing db's
b
not kinda, but you do 🙂
i
I have created a backlog task to research this properly for our needs. Thanks so far! Will let you know if your trick worked
Do I also need to clean out the UmbracoLock table?
b
nah, the other table is for other type of locks 😂
i
@User Just curious as you are quite knowledgable. Do you know if Umbraco has anything in the works for DB level locking? Just read through the docs and saw that mentioned. And by the way the site is up and running again. We are looking into our development procedure to use uSync in the future
b
Afaik, they have nothing in work for main dom locking. but anyway even if they would, it is anti practise to have multiple sources of through 😓 so i would not recommend using same db for more than 1 writer instance. Same applies to any cms 🙂
i
Makes sense, thanks for your help again!
8 Views