Fixed Random errorr when click to ip link in posts

Umit

Active member
I get this error randomly when i clicked to ip link in posts;
sometimes happening and sometimes not.
The following error occurred:

Mysqli prepare error: MySQL server has gone away
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 808
Zend_Db_Adapter_Abstract->fetchPairs() in XenForo/Model/User.php at line 2030
XenForo_Model_User->getRegistrationIps() in XenForo/Model/Ip.php at line 266
XenForo_Model_Ip->getRegistrationIps() in XenForo/Model/Ip.php at line 230
XenForo_Model_Ip->getContentIpInfo() in XenForo/ControllerPublic/Post.php at line 479
XenForo_ControllerPublic_Post->actionIp() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/mywebsite/public_html/index.php at line 17
 
What host are you using? Shared plan?

Unfortunately "MySQL server has gone away" errors are pretty much always a host/server issue.
 
I used to get this error 20-30 times a day when I was with Registerfly. Then I switched to Hostgator and the problem went away...mostly. Under vBulletin 4 it returned but only saw it two or three times a week. Now with Xenforo, I've never seen it. It's a hosting error mostly, but I have seen hung scripts cause the error as well. Log into your cpanel and see if there are any alerts.
 
Possible chit-chat with server tech guys:
Me: Hey guys, when i click on ip link in posts i am getting error msgs, wth?
Server guy: go to your software provider :p

Brogan, i doubt it is about php execution time. Because when i use this function it is working fast and i am seeing the results in a second with ajax window. But when i click on my posts (o posts that are edited by me) the ajax indicator is waiting and waiting (like 30secs) and then giving that error.
 
Possible chit-chat with server tech guys:
Me: Hey guys, when i click on ip link in posts i am getting error msgs, wth?
Server guy: go to your software provider :p

Brogan, i doubt it is about php execution time. Because when i use this function it is working fast and i am seeing the results in a second with ajax window. But when i click on my posts (o posts that are edited by me) the ajax indicator is waiting and waiting (like 30secs) and then giving that error.

Tell them "Hey guys, I am losing connection with the SQL database with all kinds of "My SQL Hase Gone Away" errors. How many simultaneous connections does my account allow and is there anything you can do to "up" the timeouts so this does not occur?"
 
Tell them "Hey guys, I am losing connection with the SQL database with all kinds of "My SQL Hase Gone Away" errors. How many simultaneous connections does my account allow and is there anything you can do to "up" the timeouts so this does not occur?"

This can tell something?
Active Persistent Links 0
Active Links 0
Client API version 5.0.91
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

and my PHP Version 5.2.6.
 
It shouldn't really be happening on a VPS, so it could be indicative of a server configuration issue.

As Dodgeboard said, get your host to investigate.
 
Is there a long delay before you get that? This would indicate that your MySQL's wait_timeout value is very low, and it's timing out because the IP lookup is taking too long. This lookup shouldn't take that long, though there are 2 approaches depending on server specs. Wait_timeout defaults to 86400, which is actually 1 day (which is far too long really, but if it's set to something like 3 or 5, that's too low).

Your best bet may be to ask your host to help. If you have root access (which you should with a VPS), you can change the value via /etc/my.cnf -- but something must've changed it down already.
 
What can be the problem?
eek.png

i tried to run nslookup command in my ubuntu netbook and it returned me an error too, my IP cant lookup my ip
smile.png
 
Top Bottom