Register    Login    Forum    Search    FAQ

Board index » Bugs » Bugs happen!




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Saving in Purchase/Receive Inventory
 Post Posted: Sat Feb 18, 2012 10:41 pm 
Offline

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


Top 
 Profile  
 
 Post subject: Re: Saving in Purchase/Receive Inventory
 Post Posted: Sun Feb 19, 2012 3:17 am 
Offline

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.


Top 
 Profile  
 
 Post subject: Re: Saving in Purchase/Receive Inventory
 Post Posted: Sun Feb 19, 2012 8:36 am 
Offline

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


Top 
 Profile  
 
 Post subject: Re: Saving in Purchase/Receive Inventory
 Post Posted: Sun Feb 19, 2012 10:41 am 
Offline

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?


Top 
 Profile  
 
 Post subject: Re: Saving in Purchase/Receive Inventory
 Post Posted: Sun Feb 19, 2012 12:08 pm 
Offline

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


Top 
 Profile  
 
 Post subject: Re: Saving in Purchase/Receive Inventory
 Post Posted: Sun Feb 19, 2012 12:12 pm 
Offline

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 :)


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Bugs » Bugs happen!


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron