A fatal MySQL error occured.

Query:
SELECT id, description_short, short_description_size, title, friendly_url, date, listing_address1, listing_address2, listing_zip, location_id, location_text_1, location_text_2, location_text_3, phone FROM pmd_v1_listings WHERE status = 'active' AND featured = 1 GROUP BY pmd_v1_listings.id ORDER by RAND(), pmd_v1_listings.priority LIMIT 0, 5

Error:
(2013) Lost connection to MySQL server during query

A fatal MySQL error occured.

Query:
REPLACE INTO pmd_v1_sessions VALUES ('cf76c0f8e4a14e92325f290453ccbf6a','initiated|b:1;',1527043995,'94082a50c352b78159112f3c522b5d0d')

Error:
(2006) MySQL server has gone away