Cannot get query SELECT id, parent_id, name as nn FROM article_cats ORDER BY BINARY name: MySQL server has gone away

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 74 bytes) in /services17/webpages/util/h/e/hebron.site.aplus.net/public/english/cutils/article_functions.php on line 229