Xibo 1.7.7, WebhostingBuzz shared business server account
Apache Version 2.4.18
PHP Version 5.6.20
MySQL Version 5.6.30
OS Linux
I’ve searched the forums quite extensively and didn’t see anything for this particular issue, so I’m posting with the hope that this may help other users save time in trying to solve this problem. I’ve spent hours trying to resolve this as a relative newb!
I had a Xibo installation that was working just fine, then one day stopped working. I could not upload files larger than about 20MB. I went through the PHP settings and verified max post, max file size, memory, max_vars, max_packet_allowed, etc. Everything was on the order of 128-256MB and 4000 characters. I still kept getting errors when trying to upload files larger than about 20MB.
In the media uploader popup window, I had the following error:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
When I went to the xibo log, I had the two errors below:
Error writing session: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
http://piwik.org/faq/troubleshooting/faq_183/
I submitted a webhost trouble ticket, which they blamed the Xibo. Upon further research, I honed in on the issue being related to mysql timeout settings. It seems my server recently changed the settings which created this problem. I’m still not sure exactly what mysql timeout variable is the source of the problem, but it appears to be connect_timeout and/or wait_timeout. According to the mysql wiki, all have a default time of 28800 seconds. I noticed mine were set very low, connect_timeout=10 and wait_timeout=20.
I then copied this installation to another server installation where connect_timeout=60, and wait_timeout=60. Sure enough, it worked just fine on this server. I contacted the webhost who said the mysql settings are server wide and they could not change them any higher. They also mentioned something about a security vulnerability as a reason to keep them low.
So I now know the source of my problems, but now have to find another webhost who has higher timeout values – unless this would be considered a bug that could be fixed in the next version. If having a large timeout is a security issue, is there a way that xibo can keep the connection active with a lower timeout value?
I hope this helps others, and I look forward to hearing if anyone else has encountered this issue and how they corrected it, short of moving to a new server.
Thanks!!