I keep getting this error almost anytime I run `mi...
# orm-help
n
I keep getting this error almost anytime I run
migrate resolve
or
migrate deploy
. Can anyone please help with this, it has slowed down my work. N.B: Postgres DB is hosted on Heroku
r
Are you sure the password hasn’t changed?
j
Looks like you are running “prisma migrate” multiple times, the first one takes a lock and then the other calls need to wait for the lock to be removed/expired
n
not at all, the password hasn't changed and it's working. as we can see it reaches the DB, the problem is the pg advisory lock timing out. Sometimes one of the commands will work, but that's when i run it later , maybe after some hours, after then subsequent deploy or resolve commands won't run. Then the next successful one will run after some hours. @Ryan @Joël
j
Where are you running “migrate” commands? from your computer? serverless? any detail might help
n
I'm running from my computer @Joël
👍 1
j
Ok sounds like somehow the advisory lock is not properly working maybe. For info about the advisory lock: https://www.prisma.io/docs/concepts/components/prisma-migrate#advisory-locking
This safeguard ensures that multiple commands cannot run at the same time - for example, if you merge two pull requests in quick succession.
Advisory locking has a 10 second timeout (not configurable)
Are you sure you are not running 2 migrate commands from any computer at the same time?
If not I can recommend creating an issue with more details here https://github.com/prisma/prisma/issues/new?assignees=&labels=kind%2Fbug&template=bug_report.yml for a reproduction
n
at all, I'm not running 2 migrate commands at the same time @Joël
👍 1
Yes, i guess the issue is from the advisory lock itself