Database lock

My database showing lock

Solved$10 Bounty

13 Replies

53295    active    advisory    2025-11-26 18:55:53.041143+00    SELECT pg_advisory_lock(72707369)
53301    active        2025-11-26 18:57:42.217225+00    "SELECT pid, state, wait_event, query_start, query
FROM pg_stat_activity
WHERE query LIKE '%pg_advisory_lock%';"
53249    active    advisory    2025-11-26 18:45:16.019049+00    SELECT pg_advisory_lock(72707369)
53290    active    advisory    2025-11-26 18:54:55.839654+00    SELECT pg_advisory_lock(72707369)
53256    active    advisory    2025-11-26 18:46:31.386732+00    SELECT pg_advisory_lock(72707369)
53238    active    advisory    2025-11-26 18:43:22.702289+00    SELECT pg_advisory_lock(72707369)

My database is blocking, and I can't run Prisma migrations. How can I fix this? I've never had this problem before.



a year ago

advsory locks are made on the application level afaik


a year ago

I wonder if prisma activated a lock but I've also never seen this



a year ago

Is this locally? On your machine?


on railway



a year ago

Check your service db credentials because Prisma has some explicit errors when tables are locked


a year ago

You can try manually removing the locks by using a DB Client like DBeaver, Beeekeeper...


a year ago

Make sure to have backups in place before doing so.


I solved the problems; it was something in the prism causing a lock.


Status changed to Solved medim • 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...