Just standard database locking stuff. You have a couple of options:

1. change the code to be in the same transaction as the one that has the record 
locked
2. wait for the lock to clear

Chances are you have either:

1. a dead-lock where thread A has a lock on record A and is waiting for a lock 
on record B, and thread B has a lock on record B and is waiting for a lock on 
record A

2. a paused transaction on a thread with a lock on record A, and the new 
transaction attached to that thread is trying to use record A (read or write)

So, change your code to make sure these don't happen, or to recover nicely when 
they do. Not that this is always easy...

Good luck!

-David


Alex Arbit wrote:
As an update to my previous e-mail today, I think I've narrowed down the
issue.

When I try to commit data to the Subscription entity, it stalls, when I
try the same action to another table, it succeeds.  It looks like the
Subscription entity is locked.  Is there a way to unlock an entity?

I'm running Postgres with isolation level: read committed.

Thanks!

-Alex


Reply via email to