MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
2006 - MySQL server has gone away
Query:
SELECT template FROM templates WHERE title='showthread_threaded_bitactive' AND sid IN ('-2','-1','1') ORDER BY sid DESC LIMIT 1