Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
141 views
in Q2A Core by

I get this error on error_log and my website is unavailable

[17-Mar-2019 14:40:21 Europe/Minsk] PHP Question2Answer MySQL query error 2006: MySQL server has gone away - Query: SELECT qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type, 1) AS `basetype`, INSTR(qa_posts.type, '_HIDDEN')>0 AS `hidden`, INSTR(qa_posts.type, '_QUEUED')>0 AS `queued`, qa_posts.acount, qa_posts.selchildid, qa_posts.closedbyid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, qa_posts.title, qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created) AS `created`, qa_posts.name, qa_categories.title AS `categoryname`, qa_categories.backpath AS `categorybackpath`, CONCAT_WS(',', qa_posts.catidpath1, qa_posts.catidpath2, qa_posts.catidpath3, qa_posts.categoryid) AS `categoryids`, qa_uservotes.vote AS `uservote`, qa_uservotes.flag AS `userflag`, qa_userfavorites.entityid<=>qa_posts.postid AS `userfavoriteq`, qa_posts.userid, qa_posts.cookieid, qa_posts.createip AS `createip`, qa_userpoints.points, qa_users.flags, qa_users.level, qa_users.email AS `email`, qa_users.handle AS `handle`, BINARY qa_users.avatarblobid AS `avatarblobid`, qa_users.avatarwidth, qa_users.avatarheight FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_uservotes ON qa_posts.postid=qa_uservotes.postid AND qa_uservotes.userid='1' LEFT JOIN qa_userfavorites ON qa_posts.postid=qa_userfavorites.entityid AND qa_userfavorites.userid='1' AND qa_userfavorites.entitytype='Q' LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN (SELECT postid FROM qa_posts WHERE type='Q' ORDER BY qa_posts.created DESC LIMIT 0,50) y ON qa_posts.postid=y.postid

[17-Mar-2019 14:40:21 Europe/Minsk] PHP Question2Answer MySQL query error 2006: MySQL server has gone away - Query: UNLOCK TABLES

Q2A version: 1.8.3

1 Answer

0 votes
by
If your site has been in service for many years and holds many writes, you may be able to avoid errors by adjusting your server variables (max_allowed_packet). However, there may be other causes for the 2006 error, so this may not be the solution.
...