June 19, 2013

Post: Debugging sleeping connections with MySQL

… are slow or not available and you’re not dealing with timeouts properly. Or may be you have several connections to MySQL server… trace originated from php stream functions not from libmysql or memcache.so, which means it is not MySQL or memcache connections leaving last… know any debugger which can connect to PHP process or apache with mod_php and provide backtrace in PHP terms not the one for…

Post: Database problems in MySQL/PHP Applications

mysql_* functions directly This is probably bad but I do not like solutions proposed by original article ether. PEAR is slow as… also note for many PHP applications abstraction layer is not the main performance problem, also benefit from persistent connections can be much… with loosing data etc. Read more in my Why MySQL Could be slow with Large Tables article. 5. The n+1 pattern…

Post: Impact of the number of idle connections in MySQL

… $numconn idle connectionsphp ./make_conn.php $numconn & cat dbt2.sql | mysql -h 10.2.2.129 -u root dbt2 sleep 120 ./run_mysql.sh… $numconn idle connectionsphp ./make_conn.php $numconn & cat dbt2.sql | mysql -h 10.2.2.129 -u root dbt2 sleep 120 ./run_mysql.sh… laptop (running dbt2) was not slowed down by handling all those connections. I tried generating the idle connections from a third box and…

Post: Read/Write Splitting with PHP Webinar Questions Followup

… a presentation on “Read/Write Splitting with PHP” for Percona Webinars.  If you missed it, you… connections can help with that. By the way, we’re seeing reports that MySQL 5.6 non-persistent connections…in sync continuously. Q: If a slave is slow because of bandwidth issues, the seconds behind master…

Comment: Too many connections? No problem!

… have my website develop in PHP with MYSQL, these are MYSQL values: datadir=/data/mysql socket=/data/mysql/mysql.sock max_connections = 600 wait_timeout = 60 interactive…-resolve skip-bdb default-time-zone=America/Caracas log-slow-queries=/var/log/mysql-slow-queries.log long_query_time=15 log-queries…

Comment: Why do you need many apache children ?

mysql connection opened in slow HTTP connection reaches to wait_timeout and MySQL aborts those mysql connections. There were about 200 Aborted_Clients per hour in mysql error… me that the main bottleneck of web server only serving php scripts is CPU not RAM. Modern best dual CPUs can…

Post: Handling big result sets

PHP script which retrieves all rows from the table: < ?php $link = mysql_connect(‘localhost’, ‘root’, ”) or die(‘Could not connect: ‘ . mysql_error()); mysql

Comment: Debugging sleeping connections with MySQL

…seeing this occurring due to every apache connection opening a mysql connection (as is common in a PHP driven website). If there is …requests increase 2. mysql queries increase 3. mysql slow queries increase 4. apache connections start to wait on slow mysql queries 5. apache connections take longer …

Comment: Database problems in MySQL/PHP Applications

mysql_* functions directly This is probably bad but I do not like > solutions proposed by original article ether. PEAR is slow as… also note for many PHP applications abstraction layer is > not the main performance problem, also benefit from persistent > connections can be much… with loosing data etc. Read more in my > Why MySQL Could be slow with Large Tables article. Deciding whether or not to…