Showing entries 1 to 2
Displaying posts with tag: mysql5 (reset)
MYSQL – Deadlock found when trying to get lock; try restarting transaction

Execute “Show Engine InnoDB Status;” query analyze the result in “Transaction” section, find out problematic queries.

Now next step is to how to avoid this problem, and here is a solution:

Deadlocks are a classic problem in transactional databases, but they are not dangerous unless they are so frequent that you cannot run certain transactions at all. Normally, you must write your applications so that they are always prepared to re-issue a transaction if it gets rolled back because of a deadlock.

  • Always be prepared to re-issue a transaction if it fails due to deadlock. Deadlocks are not dangerous. Just try again.
  • Keep transactions small and short in duration to make them less prone to collision.

Reference :  …

[Read more]
MySQL ERROR 2002: [2002] Resource temporarily unavailable (trying to connect via unix:///var/lib/mysql/mysql.sock)

One day on production server I encountered this error message, So I found out a solution for it as:

There are multiple reasons, listed below:

  1. You’ve run out of memory available to MySQL.This is the most likely problem you’re facing. Each connection in MySQL’s connection pool requires memory to function, and if this resource is exhausted, no further connections can be made. Of course, the memory footprints and maximum packet sizes of various operations can be tuned in your equivalent to my.cnf if you discover this to be an issue.

You can calculate MySQL memory using this tool – http://www.mysqlcalculator.com/

This shows maximum size a MySQL should use in your environment, in my case it’s a dedicated MYSQL …

[Read more]
Showing entries 1 to 2