Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php laravel队列守护程序邮件停止运行,出现SSL错误_Php_Email_Ssl_Laravel_Laravel 4 - Fatal编程技术网

Php laravel队列守护程序邮件停止运行,出现SSL错误

Php laravel队列守护程序邮件停止运行,出现SSL错误,php,email,ssl,laravel,laravel-4,Php,Email,Ssl,Laravel,Laravel 4,我正在运行一个laravel队列守护程序,它根据所采取的操作发送邮件。这是通过主管运行的,以确保它始终运行。起初它工作正常,但过了一段时间邮件就停止发送了。错误没有向上报告,但日志显示: [2014-07-30 20:00:21] production.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:1

我正在运行一个laravel队列守护程序,它根据所采取的操作发送邮件。这是通过主管运行的,以确保它始终运行。起初它工作正常,但过了一段时间邮件就停止发送了。错误没有向上报告,但日志显示:

[2014-07-30 20:00:21] production.ERROR: exception 'ErrorException' with message 'fwrite(): SSL operation failed with code 1. OpenSSL Error messages:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry' in /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:232
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'fwrite(): SSL o...', '/srv/www/example...', 232, Array)
#1 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(232): fwrite(Resource id #376, 'MAIL FROM: <hel...')
#2 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(171): Swift_Transport_StreamBuffer->_commit('MAIL FROM: <hel...')
#3 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(90): Swift_ByteStream_AbstractFilterableInputStream->_doWrite('MAIL FROM: <hel...')
#4 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(274): Swift_ByteStream_AbstractFilterableInputStream->write('MAIL FROM: <hel...')
#5 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(243): Swift_Transport_AbstractSmtpTransport->executeCommand('MAIL FROM: <hel...', Array, Array)
#6 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(323): Swift_Transport_EsmtpTransport->executeCommand('MAIL FROM: <hel...', Array)
#7 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(416): Swift_Transport_EsmtpTransport->_doMailFromCommand('hello@example.co...')
#8 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'hello@example.co...', Array, Array)
#9 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(174): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'hello@example.co...', Array, Array)
#10 /srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(85): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#11 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(328): Swift_Mailer->send(Object(Swift_Message), Array)
#12 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(150): Illuminate\Mail\Mailer->sendSwiftMessage(Object(Swift_Message))
#13 /srv/www/example.co.uk/bootstrap/compiled.php(3231): Illuminate\Mail\Mailer->send('emails.campaign...', Array, Object(Closure))
#14 /srv/www/example.co.uk/app/commands/Sender.php(252): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#15 /srv/www/example.co.uk/app/commands/Sender.php(252): Illuminate\Support\Facades\Mail::send('emails.campaign...', Array, Object(Closure))
#16 /srv/www/example.co.uk/app/commands/Sender.php(116): Sender->_sendEmail(Array, Array, Array, Array)
#17 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(96): Sender->queue(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#18 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php(46): Illuminate\Queue\Jobs\Job->resolveAndFire(Array)
#19 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(192): Illuminate\Queue\Jobs\RedisJob->fire()
#20 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(142): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), '2', 0)
#21 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(101): Illuminate\Queue\Worker->pop('redis', NULL, 0, '3', '2')
#22 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(73): Illuminate\Queue\Worker->runNextJobForDaemon('redis', NULL, 0, '3', '2')
#23 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(98): Illuminate\Queue\Worker->daemon('redis', NULL, 0, 128, '3', '2')
#24 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(68): Illuminate\Queue\Console\WorkCommand->runWorker('redis', NULL, 0, 128, true)
#25 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Queue\Console\WorkCommand->fire()
#26 /srv/www/example.co.uk/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /srv/www/example.co.uk/vendor/laravel/framework/src/Illuminate/Console/Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /srv/www/example.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php(887): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /srv/www/example.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /srv/www/example.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#31 /srv/www/example.co.uk/artisan(59): Symfony\Component\Console\Application->run()
#32 {main} [] []
[2014-07-30 20:00:21]生产。错误:异常“ErrorException”,消息为“fwrite()”:SSL操作失败,代码为1。OpenSSL错误消息:
错误:1409F07F:SSL例程:SSL3_WRITE_PENDING:bad WRITE retry'in/srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:232
堆栈跟踪:
#0[内部函数]:illumb\Exception\Handler->handleError(2,'fwrite():SSL o..,'/srv/www/example…',232,数组)

#1/srv/www/example.co.uk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(232):fwrite(资源id#376,'邮件发件人:这是Laravel/Swift内部的一个错误,以及它在长时间运行的队列工作程序中处理其套接字的方式。避免此问题的最佳方法是确保在发送每封电子邮件后关闭传输

Laravel内部有一个bug跟踪器,它在Laravel代码库中有几个补丁,可以解决这个问题


或者,看看这个包,它有一个更新的邮件外观,很可能会解决您遇到的问题。

这个问题似乎与主题无关,因为它不是关于编程的。请参阅帮助中心。也许或者是一个更好的问题。不确定还有什么编程比p的堆栈跟踪更重要程序设计错误,但正常