Dec 7th, 2009, 12:47 PM
Unable to acquire conversation lock after 30 seconds
I am seeing this exception in our application as well. This seems to be happening randomly in the following scenario:
We have automatic form submission logic in our form. When all the input values are valid in the form, we programatically "click" the Next button to start the form processing. But it seems that the processing is taking a while and the form is still displayed in user's browser. Then user clicks on Next button again, and this exception would occur.
What i understood from reading forums is that the locks are used to synchronize transactions in the spring webflow - e.g., if a user clicks on Next button twice, the first Next action would hold onto the lock and release after it's done. The second Next click will be processed only after the first one releases the lock.
So, my initial assessment was that when the user manually clicked the Next button, it is trying to acquire the conversation lock, which was already used by the first programmatic click of Next button, causing the timeout.
To verify the above, we modified our form processing code so that it's taking longer than 30 seconds, and make second request to see if the timeout would occur. But no luck in reproducing error.
Can anyone explain what I am missing? Thanks!
Nov 28th, 2011, 01:42 AM
LockTimeoutException: Unable to acquire conversation lock after 30 seconds
Hi Keith, Please let us know whats the solution for this LockTimeoutException as we get this frequently.
Nov 28th, 2011, 01:43 AM
Any idea how to resolve this issue?
Jan 3rd, 2012, 11:17 PM
a possible solution
see here https://jira.springsource.org/browse/SWF-1059
and the post by Lubor Vágenknecht worked for me.
Aug 13th, 2012, 07:22 AM
I got the exception after I had not annotated with @Transactional several methods which were accessing the db with hibernate in read only mode; this by itself was not throwing any exception, and the data was read correctly, but it seems that the connections were not returning to the pool (c3p0, as seems to be the case also in one of the mails on this thread). So a call to a spring service method was not returning, thereby causing eventually the LockTimeoutException. Clearly, changing the lock timeout limit in this case would not help - one should instead simply annotate all methods which access the db with @Transactional.
Oct 31st, 2012, 09:18 AM
Simple steps to reproduce:
create a webflow action which will run e.g. for 60 seconds (use sleep());
create a link to that action;
click on that link; wait some seconds; click again.
Result: LockTimeoutException (when the second click action is started + 30 seconds).
Last edited by eugene22; Oct 31st, 2012 at 10:09 AM.