MySQL 5.6.x & PHP 5.6 - seems to intermittantly lock up -


i've got multiple computers mysql 5.6.21 installed. upgraded 5.5, others have ever had 5.6 on them. every 1 of them lock every during routine sql queries our php scripts can't run further queries whatsoever. when database locks up, there's 2 options running again:

  1. restart mysql server
  2. kill process that's holding else up

all mysql servers running innodb databases , seem freeze when running queries in quick succession or when running non-finalized queries aren't written correctly, have syntax errors, etc during development process. i've noticed process causing database lock seem 'sleep' command (at least that's "show processlist" indicates).

it should noted when these computers working mysql 5.5.x databases never locked up. these databases aren't networked in way. these developer machines databases setup on localhost.

this seems similar else knew tried mysql 5.6.x. running queries within threaded web application. under mysql 5.5.x, large load of queries ran fine, after upgraded mysql 5.6.x, noticed threads ran bunch of queries @ once seemed crash/lock-up server. so, reverted mysql 5.5.x.

has else come across this?

i've read through these 2 threads:

mysql 5.6 deadlock locking same rows twice?

https://dba.stackexchange.com/questions/87016/only-innodb-databases-locking-up/87017#87017

the first thread mentions it's insert select issue. we're coding in php , don't ever execute multiple queries @ once. , our databases lock regardless of if transactions being used.

the second thread mentions bunch of innodb settings in my.cnf file. don't have innodb settings configured in my.cnf file, , i'd surprised if innodb's out-of-the-box mysql settings caused database totally lock up.

finally, here's my.cnf file looks like:

[mysqld] datadir=/usr/local/mysql/data socket=/tmp/mysql.sock open_files_limit=5000 long_query_time=1  init_connect='set collation_connection = utf8_unicode_ci' init_connect='set names utf8' character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake skip-name-resolve  [mysql.server] user=mysql basedir=/usr/local/mysql  [client] socket=/tmp/mysql.sock 

thanks suggestions!

****** update 08/04/2015 ******

after few weeks of dealing , looking issue, i've found in fact mysql doesn't lock (because can continue use access database via terminal , other database tools such sequel pro fine). nor php lock (because pages not dependant on database load fine).

so, causing php not able connect mysql server because php thinks mysql server has gone away or doesn't exist. seems related 1 or multiple processes in mysql's "show processlist" command. there known compatibility issues php mysqli/pdo , mysql 5.6? i've seen type of issue on osx , ubuntu servers running vastly different php code.

i turned logging on in mysql see if it's type of query causes issue, there's no 1 thing causes it. whenever issue starts, last php query valid query can run in terminal no problem. running query again in php doesn't guarantee issue arise again.

thanks help!

****** update 11/16/2015 ******

as promised peter a, here's screenshot of processlist looks on 1 of our development machines last time mysql server locked up.

show processlist results when mysql choked up

interestingly, couldn't create new mysql connections, continue query same database via connections had open in sqlpro or terminal. killing process 109 didn't make difference. nothing localhost webpage load until entire mysql server restarted.

the common thread can find when mysql 5.6 server locks php application caused it. doesn't seem matter type of database connection php application uses. we've seen pdo, mysqli, , deprecated mysql extensions cause mysql 5.6 server lock up.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -