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...