June 19, 2013

Post: How to Monitor MySQL with Percona's Nagios Plugins

mysql-file-privs plugin checks whether MySQL owns every file and directory within its data directory. InnoDB is getting stuck, has long-runningto be power cycled. In addition, other processes can be runaways, too, such as a poorly written script

Post: How to use tcpdump on very busy hosts

… flaw — if your long-query-time is… had to forward the tcpdump output to another host for processingto a file or piping it to mk-query-digest. Here is a draft of a script tokill $PID; ssh $REMOTEHOST — “rm -f $TMP/$TMPfile”; exit’ INT TERM EXIT touch $TMP/$LOCKFILE # run the tcpdump & write to

Post: Troubleshooting MySQL Memory Usage

running MySQL in wild. I also wanted to share some troubleshooting techniques I use. Plot Memory Usage First I would like to see MySQLto correlate to some events ? If you can’t get fancy graph quickly you can use this simple scriptto remove (or still use for processing

Post: Apache PHP MySQL and Runaway Scripts

to process control system calls including pcntl_alarm. Using this function you can set an alarm and have scriptMySQL connection to kill the query which was running (otherwise query may well continue to run even if PHP script

Post: MySQL Backup tools used by Percona Remote DBA for MySQL

to restore data in a future blog post. Tips/Tricks: run with –kill-long-queries toto encrypt all files with gpg prior to upload via a separate scriptto deal with this issue is we have a guardian process that runs during a backup. It then kills any process

Post: TPC-H Run on MySQL 5.1 and 6.0

… this box had. MySQL Also was very slow running some queries so we changed scripts a bit to kill extremely long running queries to get results for others… continue to add more cores. Having 2 CPUs and being able to use only half of system CPU resources for query processing was…

Post: MySQL Replication vs DRBD Battles

to pick either long recovery time or further degraded performance. In the large databases I run in production relaying on MySQLto have processes to ensure your application does not uses this storage engine which may be hard to

Post: Living with backups

running= 0; } … $kid = waitpid($pid, WNOHANG); if ($kid > 0) { last; } sleep(1); } What this script does is to check MySQLscript directly, but that’s not really necessary. It simply needs to know PID of the process to manage and have a way to