1
CREATE TABLE IF NOT EXISTS `music_batch_song` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `music_batch_id` bigint(20) DEFAULT NULL,
  `song_id` bigint(20) DEFAULT NULL,
  `comment` varchar(10) DEFAULT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `music_batch_song_idx` (`music_batch_id`,`song_id`),
  KEY `song_fk` (`song_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=142506 ;

I have this table that counts about 90k records on a mysql db on amazon aws. Yesterday after a couple of hours of very slow simple inserts (hundreds of them) the db stopped responding to inserts via PHP PDO. After a mysql server restart it was working again. Do you have any idea how this can happen? The server was almost inactive when the problem came up. And a single one-row PDO insert query couldn't reach the end. The insert was something like: "INSERT INTO music_batch_song (music_batch_id, song_id) VALUES (188, 32866)". After server reboot the query took a fraction of second as usual...

1
  • From your description, looks like either due to bad configuration or hardware limits, you are at the end of what MySQL can handle. error_log in the mysql directory can perhaps provide some clues.
    – Sukumar
    Jul 9, 2011 at 12:25

1 Answer 1

0

Dig up the mysql logs. Chances are it'll show a deadlock or some other InnoDB error. Deal with it as appropriate.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .