PDO::query() [<a href='pdo.query'>pdo.query</a>]: MySQL server has gone away

PDO::query() [<a href='pdo.query'>pdo.query</a>]: MySQL server has gone away

#0 [internal function]: Spawn\Spawn::exception(2, 'PDO::query() [<...', '/karate/Library...', 24, Array)
#1 /karate/Library/Spawn/myPdo.php(24): PDO->query('?????SELECT n.*...')
#2 /karate/Application/Model/News.php(48): Spawn\myPdo->query('?????SELECT n.*...')
#3 /karate/Application/Controller/News.php(96): Model\News->getAllNews()
#4 /karate/Library/Spawn/Spawn.php(97): Controller\News->showAction(Object(Spawn\Request))
#5 /karate/index.php(36): Spawn\Spawn->init()
#6 {main}
ErrorException Object ( [message:protected] => PDO::query() [pdo.query]: MySQL server has gone away [string:Exception:private] => [code:protected] => 0 [file:protected] => /karate/Library/Spawn/myPdo.php [line:protected] => 24 [trace:Exception:private] => Array ( [0] => Array ( [function] => exception [class] => Spawn\Spawn [type] => :: [args] => Array ( [0] => 2 [1] => PDO::query() [pdo.query]: MySQL server has gone away [2] => /karate/Library/Spawn/myPdo.php [3] => 24 [4] => Array ( [query] => SELECT n.*, ( SELECT count(c.id) AS counter FROM comments c WHERE c.type='news' AND c.type_id=n.id LIMIT 1 ) AS count_comments, g.original, g.medium, g.thumb, u.username FROM news n JOIN users u ON u.id=n.user_id LEFT JOIN gallery g ON g.type='news' AND g.type_id=n.id WHERE n.active=1 GROUP BY g.type_id ORDER BY n.id desc LIMIT 10 ) ) ) [1] => Array ( [file] => /karate/Library/Spawn/myPdo.php [line] => 24 [function] => query [class] => PDO [type] => -> [args] => Array ( [0] => SELECT n.*, ( SELECT count(c.id) AS counter FROM comments c WHERE c.type='news' AND c.type_id=n.id LIMIT 1 ) AS count_comments, g.original, g.medium, g.thumb, u.username FROM news n JOIN users u ON u.id=n.user_id LEFT JOIN gallery g ON g.type='news' AND g.type_id=n.id WHERE n.active=1 GROUP BY g.type_id ORDER BY n.id desc LIMIT 10 ) ) [2] => Array ( [file] => /karate/Application/Model/News.php [line] => 48 [function] => query [class] => Spawn\myPdo [type] => -> [args] => Array ( [0] => SELECT n.*, ( SELECT count(c.id) AS counter FROM comments c WHERE c.type='news' AND c.type_id=n.id LIMIT 1 ) AS count_comments, g.original, g.medium, g.thumb, u.username FROM news n JOIN users u ON u.id=n.user_id LEFT JOIN gallery g ON g.type='news' AND g.type_id=n.id WHERE n.active=1 GROUP BY g.type_id ORDER BY n.id desc LIMIT 10 ) ) [3] => Array ( [file] => /karate/Application/Controller/News.php [line] => 96 [function] => getAllNews [class] => Model\News [type] => -> [args] => Array ( ) ) [4] => Array ( [file] => /karate/Library/Spawn/Spawn.php [line] => 97 [function] => showAction [class] => Controller\News [type] => -> [args] => Array ( [0] => Spawn\Request Object ( [uri] => Spawn\Request\Uri Object ( [config] => Spawn\Config Object ( [path] => Bin/Config/ [_name] => Uri ) [path] => news/show/172 ) ) ) ) [5] => Array ( [file] => /karate/index.php [line] => 36 [function] => init [class] => Spawn\Spawn [type] => -> [args] => Array ( ) ) ) [previous:Exception:private] => [severity:protected] => 2 )