• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Connectioned timed out issues with Gmail and Gravatar

Hey everyone

Since a week Im being prompted by problems on my xf website, that connections to gravatar and gmail are timing out.

Gravatar timing out:
Server Error Log
Error Info
Zend_Http_Client_Adapter_Exception: Unable to Connect to tcp://www.gravatar.com:80. Error #110: Connection timed out - library/Zend/Http/Client/Adapter/Socket.php:235
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /usr/share/nginx/html/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('www.gravatar.co...', 80, false)
#1 /usr/share/nginx/html/library/XenForo/Model/Avatar.php(457): Zend_Http_Client->request('HEAD')
#2 /usr/share/nginx/html/library/XenForo/ControllerPublic/Register.php(374): XenForo_Model_Avatar::gravatarExists('mr730507170@gma...')
#3 /usr/share/nginx/html/library/Audentio/Invitation/Extend/XenForo/ControllerPublic/Register.php(62): XenForo_ControllerPublic_Register->actionRegister()
#4 /usr/share/nginx/html/library/XenForo/FrontController.php(347): Audentio_Invitation_extend_XenForo_ControllerPublic_Register->actionRegister()
#5 /usr/share/nginx/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /usr/share/nginx/html/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
  ["url"] => string(46) "http://www.mcmiddleearth.com/register/register"
  ["_GET"] => array(1) {
    ["/register/register"] => string(0) ""
  ["_POST"] => array(17) {
    ["username"] => string(9) "hoavaBigo"
    ["205632cff5f365cce92b4bfec11f7c5f"] => string(9) "hoavaBigo"
    ["0dc6df76570be87d56cb4e222ac093f5"] => string(21) "mr730507170@gmail.com"
    ["1acfe66404bf2498e980eaa85bf2f31a"] => string(21) "mr730507170@gmail.com"
    ["b0ca006ce61da4e1cb9e07bc14ba63d6"] => string(0) ""
    ["dob_month"] => string(1) "4"
    ["dob_day"] => string(1) "1"
    ["dob_year"] => string(4) "1982"
    ["a9d5fdce82fc2b850a08a46ca54d9725"] => array(1) {
      ["Languages"] => string(0) ""
    ["custom_fields_shown"] => array(1) {
      [0] => string(9) "Languages"
    ["69a3d89fb7192db217aeb0c99851776b"] => string(14) "Asia/Hong_Kong"
    ["captcha_question_answer"] => string(0) ""
    ["captcha_question_hash"] => string(40) "7b051f0a7d30916a7660cf96aba29a7f50de9f42"
    ["agree"] => string(1) "1"
    ["submit"] => string(7) "Sign up"
    ["_xfToken"] => string(8) "********"
    ["reg_key"] => string(32) "ecff27572e81381e6d3efe8be93dc1d4"
I also started experiencing issues at the same time with relaying mail to Gmail (I connect to gmail to send email to members)
Server Error Log
Error Info
Zend_Mail_Protocol_Exception: cannot connect to host; error = Connection timed out (errno = 110 ) - library/Zend/Mail/Protocol/Pop3.php:109
Generated By: Unknown Account, 2 minutes ago
Stack Trace
#0 /usr/share/nginx/html/library/Zend/Mail/Storage/Pop3.php(190): Zend_Mail_Protocol_Pop3->connect('pop.gmail.com', 995, 'SSL')
#1 /usr/share/nginx/html/library/XenForo/Model/EmailBounce.php(288): Zend_Mail_Storage_Pop3->__construct(Array)
#2 /usr/share/nginx/html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /usr/share/nginx/html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.9999980926514, '')
#4 /usr/share/nginx/html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999980926514, '', false)
#5 /usr/share/nginx/html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /usr/share/nginx/html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}
Request State
array(3) {
  ["url"] => string(41) "http://www.mcmiddleearth.com/deferred.php"
  ["_GET"] => array(0) {
  ["_POST"] => array(3) {
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
I am not being throttled however, since that would show up as a different error number. However it is very sudden that I start seeing connection refused for both these services at the same time. Does anyone experience them too or have any idea on where to start looking? I was thinking the firewall might have been blocking outgoing connections, but iptables -L shows no rules, so there should be no blocking of outgoing connections. I recently upgraded to CentOS7 fresh install after using 6.5 for quite a while.


Well-known member
These are mostly problems on their end, so there's not really anything you can do.

We get them with Gravatar from time to time.
From time to time I could understand, but I'm getting these very often (one week time I had 54 pages of error logs). It seems it is happening every single time.

Also I can access www.gravatar.com just fine, but on my remote server when I visit the website with 'links', it gets stuck on establishing connection. Maybe my ip got blacklisted or something?


Well-known member
I had similar problems after updating to PHP7, It could not connect over IPv6 because I don't have IPv6 yet. I disabled IPv6 on the network interface and that fixed the problem.
Check with your host that there is nothing preventing the connection, such as the firewall configuration.
The host basically only gives me hardware and a connection, and usually does not offer software or user support with problems. But I'll try, maybe there's a more upstream problem like the dns resolver.

I had similar problems after updating to PHP7, It could not connect over IPv6 because I don't have IPv6 yet. I disabled IPv6 on the network interface and that fixed the problem.
How very odd. I checked it out even though I am not using PHP7. I looked it up in the manual and followed the steps described in https://wiki.centos.org/FAQ/CentOS7#head-8984faf811faccca74c7bcdd74de7467f2fcd8ee afterwards I rebooted the server. Now I resend mails for registrations and had two users register properly without any error. Seems that indeed was the problem!
Also there were no logs to be found that pointed into that direction, I could have spent days trying to figure it out. Pinging gravatar and google mail services would work, visiting their webpages with the links program wouldn't. scp/ftp wouldn't work and then other stuff did. Glad its solved now :)