Exception Caught

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:
SELECT `exp_templates`.*, `exp_template_groups`.`group_name` FROM (`exp_templates`) JOIN `exp_template_groups` ON `exp_template_groups`.`group_id` = `exp_templates`.`group_id` WHERE `exp_template_groups`.`site_id` = 1 AND `exp_templates`.`template_name` = 'pieces_tab_features' AND `exp_template_groups`.`group_name` = '_templates'

mysqli_connection.php:122