I use file spool in my Symfony2.2 project. I flush spool every minut with cron.
An error occurs every 16 minutes with an accuracy of a few seconds: e.g. 14:38:31, 14:54:31, 15:14:31, 15:30:31. etc.
[12-Aug-2013 16:02:31 Europe/Berlin] PHP Fatal error: Uncaught exception 'Swift_IoException' with message 'Connection to mail.mydomain.pl:25 Timed Out' in /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:169
Here's stack trace:
Stack trace:
#0 /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(400): Swift_Transport_StreamBuffer->readLine(NULL)
#1 /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(277): Swift_Transport_AbstractSmtpTransport->_getFullResponse(NULL)
#2 /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(245): Swift_Transport_AbstractSmtpTransport->executeCommand('QUIT??', Array, Array)
#3 /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(217): Swift_Transport_EsmtpTransport->executeCommand('QUIT??', Array)
#4 /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/ in /home/projectname/test.projectname.pl/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php on line 169
I'm out of ideas and do not know what I can check next.
Maybe there is a connection limit to the server, but do not know how to check it out. Besides - should not swiftmailer:spool:send close the connection after execution?
This is the command from cron:
/home/projectname/test.projectname.pl/app/console swiftmailer:spool:send
UPDATE: It was due to smtp server provider.