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

XF 1.1 Connection timeout (email problem)

Discussion in 'Troubleshooting and Problems' started by daviden, Dec 15, 2013.

  1. daviden

    daviden Active Member

    Started getting my server error log filled with errors yesterday.
    Problem is connecting to the email server. This makes the forum and conversation posting very very slow (timeouting). Of course only for the threads that's being subscribed to and conversations that users choose to be alerted on via email.

    One of the error messages:
    Server Error Log
    Error Info
    Zend_Mail_Protocol_Exception: Connection timed out - library/Zend/Mail/Protocol/Abstract.php:277
    Generated By: Micke Ni, 2 minuter sedan
    Stack Trace
    #0 /var/www/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://mail.kloc...')
    #1 /var/www/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
    #2 /var/www/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
    #3 /var/www/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
    #4 /var/www/library/XenForo/Mail.php(177): Zend_Mail->send()
    #5 /var/www/library/XenForo/Mail.php(152): XenForo_Mail->sendMail(Object(Zend_Mail))
    #6 /var/www/library/XenForo/Mail.php(204): XenForo_Mail->send('patrik.ekestubb...', 'Patrike', Array, '', '', '')
    #7 /var/www/library/XenForo/Model/ThreadWatch.php(242): XenForo_Mail->queue('patrik.ekestubb...', 'Patrike')
    #8 /var/www/library/XenForo/DataWriter/DiscussionMessage/Post.php(108): XenForo_Model_ThreadWatch->sendNotificationToWatchUsersOnReply(Array, NULL, Array)
    #9 /var/www/library/bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php(29): XenForo_DataWriter_DiscussionMessage_Post->_postSaveAfterTransaction()
    #10 /var/www/library/XenForo/DataWriter.php(1399): bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->_postSaveAfterTransaction()
    #11 /var/www/library/XenForo/ControllerPublic/Thread.php(504): XenForo_DataWriter->save()
    #12 /var/www/library/sonnb/LiveThread/ControllerPublic/Thread.php(324): XenForo_ControllerPublic_Thread->actionAddReply()
    #13 /var/www/library/XenForo/FrontController.php(310): sonnb_LiveThread_ControllerPublic_Thread->actionAddReply()
    #14 /var/www/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #15 /var/www/index.php(13): XenForo_FrontController->run()
    #16 {main}
    Request State
    array(3) {
      ["url"] => string(70) "http://klocksnack.se/threads/fin-klocka-p%C3%A5-jobbet.16125/add-reply"
      ["_GET"] => array(0) {
      ["_POST"] => array(7) {
        ["message"] => string(483) "[quote="Frosse, post: 296663, member: 1721"]Det sägs väl att man ska anpassa sin klocka till sin motpart, det vill säga sitter du i förhandlingar om en stor order, uppköp etc. så ska du alltid lägga dig en nivå lägre än din motpart så att denne känner sig i överläge. Rent psykologiskt ger det dig tydligen ett överläge.[/quote]
    Intressant, det ger i så fall båda parter ett överläge då man gör klokast i att utgå från att motparten har samma info...
        ["_xfRelativeResolver"] => string(61) "http://klocksnack.se/threads/fin-klocka-p%C3%A5-jobbet.16125/"
        ["last_date"] => string(10) "1387108053"
        ["_xfToken"] => string(8) "********"
        ["_xfRequestUri"] => string(41) "/threads/fin-klocka-p%C3%A5-jobbet.16125/"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
    Running on VPS, email through same provider (via SMTP, not locally on the VPS). Called my provider and asked if I've been blacklisted, but nope - all green.
    Also tried the exact same settings through other email clients and I'm sure that the SMTP server works.

    ...help? :)
  2. Mike

    Mike XenForo Developer Staff Member

    It really could be a networking issue between your server and your mail provider. This error is coming from the attempt to actually make the network connection, so it's not something XF really has any influence over. I could only recommend changing your mail sending settings.

    In general, unless you have compelling reasons to use an external SMTP server, we generally recommend simply using the local PHP standard method (and you may be able to forward to an SMTP server from there).
  3. daviden

    daviden Active Member

    Can you recommend a mail server for Ubuntu? Easy setup preferably :)
  4. Mike

    Mike XenForo Developer Staff Member

    You may have one installed already. What you're looking for is an MTA (http://en.wikipedia.org/wiki/Message_transfer_agent). There are some listed there, but if I had to suggest one, I'd say postfix as that's what I have experience with. (Configuration is generally pretty minimal as the defaults are reasonable.)
    daviden likes this.
  5. daviden

    daviden Active Member

    Installed a quick and dirty postfix, and I'm back in the game. :)
    Wonder what caused it though.
  6. Tracy Perry

    Tracy Perry Well-Known Member

    If Ubuntu is like Debian - it installs Exim by default. I always remove it and put postfix in it's place.

    More than likely authentication problem between their server and your system. You can always configure postfix to relay through their mail server. This will probably entail some info from them - I know I used to relay my mail through gmail (Google Apps for another domain I have with them) but that has been a while ago and most of it from my server now.
    That "should" remove the delay if I understand the flow correctly as postfix will process it on your server and as far as xenForo is concerned it's processed and gone.

    Depending on how many outbound emails you send, you could always use [bd] Mails and Mandrill. The benefit is the handling of bounced messages. I've got to enable it on one of my other servers shortly also.
    On an aside - I really wish xenForo would handle the bounced mails. I realize it is more server dependent - but having an option for those that run on a VPS/Dedicated would be nice.
    daviden likes this.

Share This Page