MySQL Forums
Forum List  »  Newbie

Re: Lost connection to MySQL server during query
Posted by: Christopher Popplewell
Date: November 13, 2017 09:25PM

Thank you again for the response Peter!

I have taken your advice and have been able to determine that the mysql service must be shutting down/crashing every 4 hours. I immediately think of a cron job and I will be looking into that schedule.

In the meantime, here is the correlation that I have made:

/var/lib/mysql/s132-148-24-175.secureserver.net.err
------------------------
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 1.
InnoDB: You may have to recover from a backup.
2017-11-12 20:30:02 7ff0794ee700 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex 73a9eacb0000000100000000000000000000000692fbb77d0005000000000000000000014bd40000000000000000000000000000000000000000000000000000000000000000000000000000000000...
. 95 :5 7, @M 0 3 2 D 0 3 "+ 4 D ' P#+ ` ) $ D 6 D Pf) @ c $+ ) " ) @$+ ) " 6 ` ; D x 6 ;5 (;5 @ 6 P f ( @ @ @ p$+ 7, pA= " <5 @ 6 @ <5 @ ; D p 6 2` 7 @ _5 5 ;
InnoDB: End of page dump
2017-11-12 20:30:02 7ff0794ee700 InnoDB: uncompressed page, stored checksum in field1 1940515531, calculated checksums for field1: crc32 1062689690, innodb 4217881636, none 3735928559, stored checksum in field2 0, calculated checksums for field2: crc32 1062689690, innodb 145366930, none 3735928559, page LSN 6 2465970045, low 4 bytes of LSN at page end 0, page number (if stored to page already) 1, space id (if created with >= MySQL-4.1.1 and stored already) 84948
-------------------------


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

In the query log, you would see tens of thousands of queries completing and kicking off at 2030 in this small sample.

/var/lib/mysql/s132-148-24-175.log
-------------------------
...
LEFT JOIN `cron_schedule` AS `existing` ON existing.job_code = current.job_code AND existing.status = 'running'
SET `current`.`status` = 'running'
WHERE (current.schedule_id = '1070625') AND (current.status = 'pending') AND (existing.schedule_id IS NULL)
497 Query START TRANSACTION
497 Query UPDATE `cron_schedule` SET `job_code` = 'cache_warmer_run_job', `status` = 'pending', `messages` = NULL, `created_at` = '2017-11-13 20:30:40', `scheduled_at` = '2017-11-13 20:32:00', `executed_at` = NULL, `finished_at` = NULL WHERE (schedule_id='1070625')
497 Query COMMIT
497 Query UPDATE `cron_schedule` AS `current`
...
171113 20:30:00 503 Query SELECT `t_d`.`attribute_id`, `e`.`entity_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_varchar` AS `t_d`
INNER JOIN `catalog_category_entity` AS `e` ON e.entity_id = t_d.entity_id
LEFT JOIN `catalog_category_entity_varchar` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (e.entity_id IN (171, 282, 285)) AND (t_d.attribute_id IN ('45', '117')) AND (t_d.store_id = IFNULL(t_s.store_id, 0))
503 Query SELECT `url_rewrite`.* FROM `url_rewrite` WHERE (`entity_id` IN ('171')) AND (`entity_type` IN ('category')) AND (`store_id` IN (1))
503 Query SELECT `url_rewrite`.* FROM `url_rewrite` WHERE (`entity_id` IN ('282')) AND (`entity_type` IN ('category')) AND (`store_id` IN (1))
503 Query SELECT `url_rewrite`.* FROM `url_rewrite` WHERE (`entity_id` IN ('285')) AND (`entity_type` IN ('category')) AND (`store_id` IN (1))
503 Query SELECT `main_table`.* FROM `amasty_amshopby_page` AS `main_table`
...

Options: ReplyQuote


Subject
Written By
Posted
Re: Lost connection to MySQL server during query
November 13, 2017 09:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.