Lock wait timeout: Could not commit JPA transaction

We are using MySQL v5.1.67 under Solaris (SmartOS) in a zone. We are using Java EE and Jetty as our servlet container (Hibernate, Ehcache). Sometimes we get: "Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while commiting the transaction" and then "Lock wait timeout exceeded; try restarting transaction". We have the database as one file instead of one file per table. The file is large about 20 GB. There are millions of rows in many tables. One table has 30 million rows. Some table has varchar(255)s. Some others have texts. It seems like cells in the database has been broken. Because if you try to update the same entry in the DB you get a "Lock wait timeout exceeded; try restarting transaction", just by issuing a MySQL query. The problem persists until you restart the DB server. Sometimes they start appearing again after a while. Now they seem to come more and more often. There are a lot of threads in the Java EE .war application. We send more and more JMS messages. There is also PHP-code accessing the database. How do we stop this problem from occuring?

I don't think it's threads deadlocking. I've seen this problem many times before and I've always been able to fix it by restarting the MySQL-server. Then it executes normally day after day. Then something special happens and then it fails every day until I restart mysql. I've also encountered the same problem using the test database I have on my local machine. Only one job executes, the one I'm testing. First it works every run. Something special happens usually triggered by errant code. I fix the error. The job continues to fail with the same message "Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while commiting the transaction". If try to do a simple UPDATE SQL query accessing exactly the row that's been corrupted, I get a lock wait timeout. But if I restart the database it starts working again. The update works and the Java job works both locally and on the server. But now a special job has experienced more severe problems of this nature. I restart mysql and the job works when triggered manually but not when triggered chronologically on schedule. Actually all failed first and then a few worked but most failed. It's the same job executing multiple times.

Similar Messages

  • Error 131 Transaction rolled back by lock wait timeout

    Hello all,
    I was trying to run apriori, and then HANA writer in my database.
    Apriori executes directly, and then I configure and try to execute HANA Writer. But it keeps executing for more than half an hour, and then gives the following error: Error 131 Transaction rolled back by lock wait timeout. Lock timeout occurs while waiting TABLE_LOCK of mode EXCLUSIVE.
    Bimal suggested me to reduce the data to be analysed, so then I reduced it to a pretty small part and executed again.
    It gave me the same error after more than 30 minutes waiting executing.
    after having this error, I tried just execute apriori, but with a filter of 5 transactions and than it worked. After that I tried to visualize the results, and got the following error:
    It means that my HANA memory is full?
    I got the view from HANA:
    Regards!
    Error 131 Transaction rolled back by lock wait timeout 

    Hi Jurgen,
    I'm a developper for PAL from Shanghai team.
    Could you please provide some details information about this case:
    -          How many records did you use ?
    -          What’s the value of “MIN_SUPPORT” and “MIN_CONFIDENCE” did you use ?
    The algorithm of apriori will consume much memory when the input data is very large and min_support is low.
    So I suggest you set “MIN_SUPPORT” and “MIN_CONFIDENCE” as 0.9 firstly, check if it can output result.
    Thanks,
    Peng

  • Could not commit transaction

    Hi,
    I am creating an approval procedure for SO, checking balance, due inovices and payment terms. The approval should not be trigger when the SO is cash basic. The payment term cash basic has code -1. This is my query. I got the error Could not commit transaction.
    What is wrong?
    SELECT CASE WHEN T0.Balance+$[$29.0.NUMBER] >  T0.CreditLine AND
    $[ORDR.GroupNum] <> (-1 ))
    OR
    (SELECT COUNT(*) FROM [dbo].[OINV] T1 WHERE T1.DocDueDate<GetDate()  AND T1.DocStatus='O' AND T1.CardCode = $[ORDR.CardCode]) > 0
    AND
    $[ORDR.GroupNum] <> (-1 )
    THEN 'TRUE'
    ELSE 'FALSE' END
    FROM [dbo].[OCRD] T0
    WHERE T0.CardCode = $[ORDR.CardCode]
    Tks
    Adriana

    Hi Adriana,
    By analyzing your logic, I simplified it. Please try this query:
    SELECT Distinct 'TRUE' From dbo.OCRD T0, dbo.OINV T1
    WHERE (T0.CardCode = $[$4.0.0]) AND ($[ORDR.GroupNum] !=N'-1') AND
    ((T1.DocDueDate<GetDate() AND T1.DocStatus='O' AND T1.CardCode = $[$4.0.0])
    OR (T0.CreditLine - T0.Balance < $[$29.0.NUMBER]))
    Thanks,
    Gordon

  • Web Services,Delivery Document Adding Error  Could not commit Transaction

    Dear All,
       I am working with SAP Business One Web Services, While adding Delivery Document it's giving error  "Could not commit transaction"  Please Give your Suggestion It's urget.
    Thanks,
    Madhu
    9701155577

    Hi,
    Do you mean there is no journal entry created orthat the link is missing?
    If this really is a delivery for stock/inventory items there should be a journal entry, else it sounds like an error in SAP.
    Are there still changes in the stored procedure? Also have a look at the TansactionNotice. It is possible the roll back does not work correctly.
    Again sounds like an error.
    Doe sit happen all the time?
    Only for certain items?
    Are the stored procedures now clean?
    What Version are you using?
    Kind Regards,
    Friederike

  • Error 'Could not commit transaction'

    Dear Expert,
    I am facing error ' Could not commit transaction' while entering  Good Receipt PO . All GL account mapped.

    Hi,
    Please check for the Approval procedures and see if the user for which
    you are getting error is defined the originator for the affected
    documents.
    You can check this by going through all the Approval template for that
    particular document.
    Then check the Terms tab of that template and if in Launch Approval
    Procedure "When the following applies" is ticked then check the "Ratio"
    column and "Value" column and make sure that some value is given there.
    There should not be any undefined type.
    If there is any Template which has undefined type selected then please
    logged in as the Authoriser or Approver of that template and modify
    that term.
    Check all the approval template and go through the term tab and see the
    value defined there.
    Hope this will help.
    Regards,
    Gagan Thareja
    SAP Business One Forums Team

  • Could not commit transaction Error 1 Detected During Transaction G/L Account

    hi experts
    when i was adding Sales Order i am getting an error as Could not commit transaction Error 1 Detected During Transaction G/L Account

    Hi,
    Plz find the following threads:
    Transaction failure with error message \&quot;Error -1 detected during transaction\&quot; when update the G\\L Account D…
    "Could not commit transaction: Error -1 detected during transaction"
    Could not commit transaction: Error -1 detected during transaction 'Payment Methods for Payment Wizard' (OPYM)
    Could not commit transaction when inserting new items

  • "Could not commit transaction: Error -1 detected during transaction"

    hi guys,
    im getting this error "Could not commit transaction: Error -1 detected during transaction" when trying to create standard document/s. i am now using B1 8.8, MS SQL 2008.
    originally, my program was written for B1 2005, MS SQL 2005, and it WORKED.
    we upgraded into B1 8.8, MS SQL 2008, and now my program is not working. it is now having the mentioned error upon committing transaction (vCompany.EndTransaction(wf_Commit)). tried removing transaction handling, and it WORKED. also, tried simplifying the program, instead of creating multiple documents, i modified it in just creating one document with transaction handling, and it WORKED.
    initialliy, this issue seems to be related to MS SQL 2008.
    please help, thanks.

    Hi Emmanuel........
    You get this error due to the Approval Procedure.
    Please check if it is activated then please deactivate it from Administration> Approval> Approval Template.......
    Then try.......
    Regards,
    Rahul

  • Failed to add data -1116 could not commit transaction

    Hello Experts
    After installation of our add-on on client machine with SAP 8.8.1. we have received this error:
    "Failed to add data -1116 could not commit transaction" after traing to add data to our table by using this code :
    Dim oUserTable As SAPbobsCOM.UserTable
    oUserTable = oCompany.UserTables.Item("UserTab")
    'Set default, mandatory fields
    oUserTable.Code = UniqueID
    oUserTable.Name = UniqueID
    'Set user field
    oUserTable.UserFields.Fields.Item("U_UserField").Value = "UserValue"
    oUserTable.Add()
    What should I do?
    Thanks

    Hello
    Also execute the following statement on server in a query analizer
    select @@version
    if the versions (client and server) are the same it is correct. If not, you can apply the sql native client (sqlncli.msi) from sql server patch
    regards
    János

  • Finding the lock wait timeout in Oracle 11g

    Want to know how to find the lock wait timeout set on Oracle 11g

    Hi,
    To find number of seconds a distributed transaction waits for a lock:
    SELECT *
      FROM v$parameter
    WHERE NAME = 'distributed_lock_timeout';To find all parameter's related to lock you can use something like this:
    SELECT *
      FROM v$parameter
    WHERE NAME like '%lock%';Thanks,
    Shankar

  • Can not commit distributed transaction

    Hi
    We get error "can not commit distributed transaction" during
    commit the transaction in which we have create NEW entities.
    Update-transactions on existing enitites work correct.
    Our problem is probably due to seauences for object IDs: we are using oracle native sequences:
    <sequence name="SeqErrRecObj" strategy="nontransactional" factory-class="native(Sequence=BUYING.SEQ_ERRRECOBJ)"/>
    As soon we use strategy="nontransactional" in managed environment,
    we get "can not commit distributed transaction" error by creating new instance.
    Switching to strategy="transactional" seems to eleminate this problem.
    I did not found any hint in about this in documentation.
    Can some one confirm our assumption that using nontransactional oracle sequences in manageg (WebLogic 9.2) environment
    is responsible for "can not commit distributed transaction" error and "strategy=transactional" is the right solution.
    Probably we are completely wrong and tehre is some other explanation for this error ?
    kind regards
    Andre Teshler

    Hi Andre,
    It sounds like you have not configured a non-transactional datasource. See section "4.2.1. Managed and XA DataSources" in the <kodo>/docs/jdo/pdf/manual.pdf. Connection is for the managed datasource and Connection2 for the non-transactional.
    David Ezzio

  • Item Could not commit action because it is currently in focus error.

    Hi experts,
    we developed addons for our client in 2007 B version.
    Recently we upgraded our client server from SAP 2007B to 8.8.
    The addons worked fine in 2007B.when we upgraded to 8.8 the error is occuring like
    "Item-could not commit action because item is currently in focus [66000-23]"
    when i disable a textbox(already it is focus) in my form the above  error is occuring.
    But this error was not happened with  2007B.
    Please tell me is there any solution with out changing the code(i am unable to change the code).
    Thanks in advance.
    Edited by: vivek.Y on Jun 11, 2011 5:15 PM

    Hi Jonathan,
    Besides setting the focus and trying to disable the control, it was still throwing exception. So I tried a following:
    Work around for this issue.
                                        Try
                                            oForm.Items.Item("ControlWithFocus").Enabled = False
                                        Catch ex As Exception
                                            Dim oItem As Item = oForm.Items.Item("AnyOtherItem")
                                            oItem.Click(BoCellClickType.ct_Regular)
                                            oForm.Items.Item("ControlWithFocus").Enabled = False
                                        End Try
    This is a trick where you can set focus to another control and set enable to false.
    Hope this helps.
    Regards,
    Kashif Ali
    Edited by: Kashif Ali on Sep 21, 2011 11:43 AM

  • Could not enlist in transaction

    Hi All
    wls70 --> tux8.0
    some times I get the following errors
    ==##[2004-07-08 08:43:57.516]##== HomeReceiver#[281] exception: interboss.util.InterException:
    -180001****??tuxedo????****TPESYSTEM(12):0:0:TPED_MINVAL(0):QMNONE(0):0:ERROR:
    Could not enlist in transaction
    at weblogic.wtc.gwt.TuxedoConnection.<init>(TuxedoConnection.java:120)
    at weblogic.wtc.gwt.TuxedoConnectionFactory.getTuxedoConnection(TuxedoConnectionFactory.java:32)
    at interboss.util.ConnTuxedo.wtcTransCall(ConnTuxedo.java:42)
    at interboss.util.ConnTuxedo.wtcTransCall(ConnTuxedo.java:24)
    at interboss.busi.CashPay.runClass(CashPay.java:129)
    at interboss.servlet.HomeReceiver.Process(HomeReceiver.java:156)
    at interboss.servlet.HomeReceiver.doPost(HomeReceiver.java:286)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

    Hi,
    Can you provide a little context here? This error occurs when WTC tries to enlist
    itself in the WLS transaction and receives a SystemException. What is starting
    the transaction?
    Regards,
    Todd
    "dong" <[email protected]> wrote:
    >
    Hi All
    wls70 --> tux8.0
    some times I get the following errors
    ==##[2004-07-08 08:43:57.516]##== HomeReceiver#[281] exception: interboss.util.InterException:
    -180001****??tuxedo????****TPESYSTEM(12):0:0:TPED_MINVAL(0):QMNONE(0):0:ERROR:
    Could not enlist in transaction
    at weblogic.wtc.gwt.TuxedoConnection.<init>(TuxedoConnection.java:120)
    at weblogic.wtc.gwt.TuxedoConnectionFactory.getTuxedoConnection(TuxedoConnectionFactory.java:32)
    at interboss.util.ConnTuxedo.wtcTransCall(ConnTuxedo.java:42)
    at interboss.util.ConnTuxedo.wtcTransCall(ConnTuxedo.java:24)
    at interboss.busi.CashPay.runClass(CashPay.java:129)
    at interboss.servlet.HomeReceiver.Process(HomeReceiver.java:156)
    at interboss.servlet.HomeReceiver.doPost(HomeReceiver.java:286)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)

  • Error: Sorry! We could not complete the transaction using this payment method. Please contact support.

    I am everytime getting the following error
    Sorry! We could not complete the transaction using this payment method. Please contact support.
    I have put my 2 credit card information with Microsoft. I tried calling 2 times the customer support but it was a pathetic response. In a single call I talked to 4 customer support officers and everybody passed on the call to the next without resolving the
    problem, and without telling the next officer what is my issue!! they just passed on the phone call to avoid me!!
    It is really frustrating that neither Microsoft is provide a good support (it was hard for them to understand my issue, in fact one of the support guy did not even know spelling of Azure.. he/she was saying it assure!!! and One of the guy told me that I
    cannot use credit card outside US and Canada. then why you call yourself global???
    So Microsoft you have a few things to do as your homework.
    1. Your support is pathetic, frustrating and requires better people out there who know about your products, so train them first!
    2. You got my 2 credit cards information which I see at subscriptions for Windows Azure, please remove both of them if you cannot provide a good support and subscription.
    3. Learn from other cloud providers, AWS will otherwise kill your business.
    Regards
    Kajal
    Kajal Sinha

    Hi Kajal,
    Sincerely apologize for this inconvenience, for billing & account issue, usually we need to contact the support team by creating a support ticket at
    http://www.windowsazure.com/en-us/support/contact/. Or if that doesn't work because you don't have an active subscription you will need to contact general customer support to have them create
    a support ticket for you 
    http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0).
    If above support channels don't work, at your convenient, could you please send an email to me: dxu at microsoft.com with kindly providing your:
    Name
    Email address
    Phone number 
    We will provide help via emails. Thank you.
    Best Regards,
    Ming Xu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Deadlock - Could Not Commit Transaction

    Hi Experts,
          While posting Journal Entries through B1if, we encountered an 'Deadlock Error' 'error, unable to commit the transaction. Although the process is executed through Queue, we faced the same multiple times. Solutions are highly appreciated.

    HI,
    While ur inserting through DI API.try to lock the table and insert.
    ROM A WITH(NOLOCK)
    regards,
    Prasad

  • Lock wait timeout exceeded; try restarting transaction

    hi i searched for above problem lot in net but still i am not getting proper solution i have made a simple app where i am using hibernate and i am just having one transaction ,early when i got this error i was making two transaction but later i am having still same exception when i stop and restart i wont get it but second time i get

    It means the tables you are trying to access is locked by some other process.
    You need to unlock those tables or you can try by restarting your database!

Maybe you are looking for

  • Not getting all messages on iMessage.

    I don't understand what is happening with my messages. Both yesterday and now today I would only get some of my messages. Tonight I missed out on a whole conversation between a friend of mine and my BF in a group message. Then when my BF went to forw

  • How can i print a one page spread sheet without having it spread over several sheets of paper none of which is complete?

    I have an iMac less than 1 year old with lion o/s and numbers. i have been spoiled in the printing of spread sheets on PC's. I find it impossible to print only 1 page when printing a single page spread sheet. The result is my spread sheet spread over

  • Clear_record in Oracle Forms

    When I use clear_record in a block on a form the record seems to go away but it is still held in a buffer somehow. When the form saves the block to the database, the clear records are still there. Any idea what could be causing this? Here is part of

  • Core dump using OCI HP 32 bit package

    Does any one successfully run OCI application on HP using 32 bit libraries? I got core dump at the end of running application, around desctruction part. Following are the statement I got from GDB: #0 0xc005db14 in pthread_mutex_destroy+0x18 () from /

  • Loud rat-at-tat​-tat noise in my J4680 All-in-One

    My HP Officejet J4680 All-in-One has suddenly developed an terrible LOUD rat-at-tat-tat sound.  It sounds like something plastic ratcheting against something.  It's so loud, it sounds like it's about to break.  It happens when I turn the printer on a