Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: LockTimeoutException: Unable to acquire conversation lock after 30 seconds

  1. #11
    Join Date
    Dec 2009
    Posts
    1

    Default 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!

  2. #12
    Join Date
    Nov 2011
    Posts
    3

    Exclamation 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.

  3. #13
    Join Date
    Nov 2011
    Posts
    3

    Default

    Hi keith,
    Any idea how to resolve this issue?

  4. #14

    Default a possible solution

    see here https://jira.springsource.org/browse/SWF-1059
    and the post by Lubor Vágenknecht worked for me.

  5. #15
    Join Date
    Aug 2012
    Posts
    1

    Default

    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.

  6. #16
    Join Date
    Oct 2012
    Posts
    1

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •