| Author |
Message |
|
bowes
|
Post subject: Saving in Purchase/Receive Inventory Posted: Sat Feb 18, 2012 10:41 pm |
|
Joined: Sat Jun 26, 2010 3:44 am Posts: 19
|
|
Trying to save a Purchase/Receive and getting the following at the bottom of the trace file:
The failing sql was: insert into accounts_history (ref_id, so_po_ref_id, acct_id, journal_id, purchase_invoice_id, amount, post_date) values ('1878', '0', '403', '6', '1234', '1', '2012-02-18') Time: 846 ms, 12 SQLs 30 ms => mySQL returned: 1213 Deadlock found when trying to get lock; try restarting transaction
Page trace stats: Execution Time: 846 ms, 12 queries taking 30 ms
This is in a user account that I have now given full access to everything...
|
|
 |
|
 |
|
hucka
|
Post subject: Re: Saving in Purchase/Receive Inventory Posted: Sun Feb 19, 2012 3:17 am |
|
Joined: Wed Sep 21, 2011 11:42 am Posts: 93 Location: Brno, Czech Republic
|
|
It seems like some kind of MySQL problem. Try to restart MySQL server and try again. It should help.
|
|
 |
|
 |
|
dave
|
Post subject: Re: Saving in Purchase/Receive Inventory Posted: Sun Feb 19, 2012 8:36 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
I lock the db when processing transactions so I can back them out if something goes wrong. In this case, mysql could not lock the db so the transaction should have failed and a message displayed. This can be fixed by simply re-posting the transaction. If not, further troubleshooting will be necessary.
Dave
|
|
 |
|
 |
|
bowes
|
Post subject: Re: Saving in Purchase/Receive Inventory Posted: Sun Feb 19, 2012 10:41 am |
|
Joined: Sat Jun 26, 2010 3:44 am Posts: 19
|
|
this happens every time i try to post a transaction, from all user accounts. how do I restart the server?
|
|
 |
|
 |
|
dave
|
Post subject: Re: Saving in Purchase/Receive Inventory Posted: Sun Feb 19, 2012 12:08 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Do you have any custom code on this server? Can you eventually get the transaction through? Can you post a Purchase/Receive for another contact? Do you have InnoDB running on the server?
Restarting the mysql server probably won't fix the problem as it appears that another process is trying to lock the same table/record which I don't do in the core.
Dave
|
|
 |
|
 |
|
bowes
|
Post subject: Re: Saving in Purchase/Receive Inventory Posted: Sun Feb 19, 2012 12:12 pm |
|
Joined: Sat Jun 26, 2010 3:44 am Posts: 19
|
Aha, nevermind, ran a repair on the database from the cpanel and all seems to be well now... thanks 
|
|
 |
|
 |
|