Query error: MySQL server has gone away

Query: SELECT * FROM locality WHERE id=1 LIMIT 1;