Results 1 to 6 of 6

Thread: Unable to acquire conversation lock after 30 seconds.

  1. #1
    Join Date
    Apr 2011
    Posts
    3

    Default Unable to acquire conversation lock after 30 seconds.

    I have been reading those posts related to this issue but couldn't able to find a solution from any of the threads.

    In our production server, we have the above issue in the following scenario.
    1. From application GUI, one user run a query which takes longer time [generic search with 1 million records]
    2. another user trying to access the same page and it takes more time to load and click again or refresh.

    In the db connection pool, we have set initial capacity as 1 and maximum as 15 with increment as 1.

    we use spring web flow jar [org.springframework.webflow-2.0.9.RELEASE.jar]

    Please suggests any new spring web flow version resolve the issue.

    Error summary from weblogic log: Internal server error...
    Root cause of ServletException.
    org.springframework.webflow.conversation.impl.Lock TimeoutException: Unable to acquire conversation lock after 30 seconds
    at org.springframework.webflow.conversation.impl.JdkC oncurrentConversationLock.lock(JdkConcurrentConver sationLock.java:44)
    at org.springframework.webflow.conversation.impl.Cont ainedConversation.lock(ContainedConversation.java: 69)
    at org.springframework.webflow.execution.repository.s upport.ConversationBackedFlowExecutionLock.lock(Co nversationBackedFlowExecutionLock.java:51)
    ....

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    1. From application GUI, one user run a query which takes longer time [generic search with 1 million records]
    Wonderful number, of course it must take a good amount of time

    2. another user trying to access the same page and it takes more time to load and click again or refresh.
    Consider the other user use a different flow session, perhaps to arrive to the same page he is passing by a flow state where is mandatory work with the 1 million again!

    Use code tags

    Code:
    Root cause of ServletException.
    org.springframework.webflow.conversation.impl.LockTimeoutException: 
    Unable to acquire conversation lock after 30 seconds
    at org.springframework.webflow.co.....
    Did you defined in your web.xml something like


    Code:
        
    <session-config>
          <session-timeout>somenumber</session-timeout> 
    </session-config>
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Apr 2011
    Posts
    3

    Default Unable to acquire conversation lock after 30 seconds.

    Hi
    I understand it would take more time for long running query. I had mentioned as an example as 1 million but the number varies for times which could be 100K also but in general when has long running query.

    I didn't set the default value 30 seconds for session config from application side [web.xml] which is

    i heard the issue was resolved in spring 2.0.9 regarding conversation lock.

    please suggest whether can we increase the time or to increase the initial capacity in connection pool parameters would resolve the issue or may need to resolve it using the framework methods or if any.

    There are so many threads related to the issue but don't find solution. Please help.

    http://forum.springsource.org/showthread.php?t=56618

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    I didn't set the default value 30 seconds for session config from application side [web.xml] which is
    Post the code for such file

    i heard the issue was resolved in spring 2.0.9 regarding conversation lock.
    Is an old thread and old Spring version release too

    please suggest whether can we increase the time or to increase the initial capacity in connection pool parameters would resolve the issue or may need to resolve it using the framework methods or if any.
    Post all your configuration about DB (Datasource, pools), perhaps a missing detail we have there
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  5. #5
    Join Date
    Apr 2011
    Posts
    3

    Default Unable to acquire conversation lock after 30 seconds.

    1. web.xml
    - No setting for session time out. and the conversation lock is set in the framework and the default value is 30 seconds.

    getLockTimeoutSeconds
    public int getLockTimeoutSeconds()
    Returns the time period that can elapse before a timeout occurs on an attempt to acquire a conversation lock. The default is 30 seconds.
    setLockTimeoutSeconds
    public void setLockTimeoutSeconds(int timeoutSeconds)
    Sets the time period that can elapse before a timeout occurs on an attempt to acquire a conversation lock. The default is 30 seconds.
    Parameters:
    timeoutSeconds - the timeout period in seconds

    So, i would like to know the option to increase ourself through application code. Please help if anyone aware of it.

    2. yes, but no solution provided.

    3.
    as i mentioned in my post, Connection pool information is as below:
    apart from db details, it is configured as initial capacity = 1, maximum capacity = 15 and capacity increment = 1. No other specific setting is configured.

    If i change the initial capacity suppose to 7 would there be any advantage or doesn't have dependency with the exception we got.

    thinking whether is it something the db setting causing the issue or an issue which is yet to be resolved by framework.

    Thanks.

  6. #6
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    Use code tags next time

    So, i would like to know the option to increase ourself through application code. Please help if anyone aware of it.
    Such API has a set

    public void setLockTimeoutSeconds(int timeoutSeconds)
    Sets the time period that can elapse before a timeout occurs on an attempt to acquire a conversation lock. The default is 30 seconds.
    Parameters:
    timeoutSeconds - the timeout period in seconds
    You could override such attribute in your beans configuration

    But

    Code:
    as i mentioned in my post, Connection pool information is as below:
    apart from db details, it is configured as initial capacity = 1, maximum capacity = 15 and capacity increment = 1. No other specific setting is configured.
    Post such Configuration, what tool you are using for pooling? C3PO?

    Perhaps you have missing detail there
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

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