2013 - Lost connection to MySQL server during query

select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price from products p, products_to_categories p2c, categories c where p.products_status=1 and p.products_id = p2c.products_id and p.products_id !='0' and c.categories_id = p2c.categories_id and c.categories_status=1 order by p.products_date_added desc limit 2

[XT SQL Error]

2006 - MySQL server has gone away

select count(*) as total from sessions where sesskey = '3f77d24c083884a3099e84a4b61812c4'

[XT SQL Error]