Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Laravel 4.2 issue #1

Closed
jithujose opened this issue Sep 2, 2015 · 5 comments
Closed

Laravel 4.2 issue #1

jithujose opened this issue Sep 2, 2015 · 5 comments

Comments

@jithujose
Copy link

I am using this package to solve the laravel issue 4573.

Unfortunately it's not working for me. After some time swiftmailer will start to throw "bad write retry" error and I've to keep restarting supervisord to temporarily solve the issue.

Full error:
fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry

I am calling artisan like this from supervisord worker:
php artisan queue:work --queue=my_emails_tube --daemon --env=production

Any hints? Thank you.

@YOzaz
Copy link
Owner

YOzaz commented Sep 3, 2015

I'm not an expert in these - but from my understanding, a problem is in OpenSSL, not SwiftMailer? Guys here as suggesting to lower down amount of data being sent - that is, you may be sending too much of stuff at once.
In either case - it would be good to ask @xdecock (SwiftMailer author) how to solve it, if that's possible.
A different (possibly, better?) solution would be to close SMTP connection at the end of job processing - see Coding For Daemon Queue Workers, by calling $transport->stop() - in such case, you don't need my package at all. If you'll try that, and problem persists - I would definately search for a problem in server itself.

@xdecock
Copy link

xdecock commented Sep 3, 2015

PHP version?

seems like a strange bug, do you have any backtrace to provide?

it seems like an openssl odd things, that force write retry to not account the bytes returned as sent.

Could be complex to avoid.

And, indeed, do you have any timeline? like the duration of the process and the "idle time" between mails?

Regards,

Xavier

@jithujose
Copy link
Author

Hi @xdecock , @YOzaz,
I am running PHP 5.5.9 on ubuntu server 14.04 LTS.

Here is the log:
https://gist.github.com/jithujose/1ea9543f1a10e81d3a12

Unfortunately I don't have the process duration but the idle time between mails is normally really long (1+ hours).

Anyway I will try to see if by closing the SMTP connection I can solve the issue.

Regards,
JJ

@xdecock
Copy link

xdecock commented Sep 3, 2015

yes, the 1+ hour will cause ssl session renegotiation in the best case,
connection RST more probably, and is probably your issue.

On Thu, Sep 3, 2015 at 12:33 PM, Jithu Jose notifications@github.com
wrote:

Hi @xdecock https://github.com/xdecock , @YOzaz
https://github.com/YOzaz,
I am running PHP 5.5.9 on ubuntu server 14.04 LTS.

Here is the log:
https://gist.github.com/jithujose/1ea9543f1a10e81d3a12

Unfortunately I don't have the process duration but the idle time between
mails is normally really long (1+ hours).

Anyway I will try to see if by closing the SMTP connection I can solve the
issue.

Regards,
JJ


Reply to this email directly or view it on GitHub
#1 (comment)
.

Xavier De Cock
GPG Fingerprint: 93CA EE3F 9F57 5BE1 AE4A 794D 3C74 CA9E E7A5 0C1B
GPG Id: 0xE7A50C1B

@YOzaz
Copy link
Owner

YOzaz commented Apr 5, 2016

Goes out of the package scope, specific to SSL certificate validation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants