Any suggestions for how to resolve an error like t...
# orm-help

Question

How can I resolve a timed out postgres advisory lock error?

Answer

There could be several reasons for this error, including a stuck migrate process or multiple deployments running concurrently. One potential solution is to restart the database server. Additionally, checking the locks in PostgreSQL may provide useful information for resolving the issue.

t
Any suggestions for how to resolve an error like this?
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See <https://pris.ly/d/migrate-advisory-locking> for details.
n
Hey Trenton 👋 It could be a couple of things: • There is a migrate process still running somewhere that is holding the lock. • If you see this error while deploying the app, it probably means there are multiple deployments running concurrently. In that case, the error is expected for all but one of the runners.
t
I think it's the first issue. I accidentally quit my terminal before selecting “y/n” for “do you want to proceed with this migration?”
Is there a way to resolve this?
n
Is it possible to restart your database server?
j
@Trenton K there are some ways to check the locks in PostgreSQL like https://stackoverflow.com/a/26596931/1345244 Might be interesting to check if you find something there
1
118 Views