Closed pirmax closed 3 years ago
Many pass but many also fail, and it is quite embarrassing.
I have this as a regular occurrence with Twitter (I've access to a system doing lots of API calls to a lots of different social media APIs, but Twitter stands out with this problem).
The only way to deal with this is a smart system with retries: check the error, retry up to n
tries, etc.
The problem with trying again is that it loops in a void, the error is never resolved.
My experience is that these errors are temporary and I've seen first hand that retrying "solves" an API interaction.
For example big videos which need to be uploaded it chunks failed due to this, but once retry was added, the respective chunks were tried again and it "just worked" in the end.
This is typically caused by connection issues between your servers and Twitter or Twitter servers. I don't think there is much this library could do. You could try automatically retrying failed requests once.
Hello,
After looking at what the following error was:
Abraham\TwitterOAuth\TwitterOAuthException: OpenSSL SSL_read: Connection reset by peer, errno 104 in /home/.../vendor/abraham/twitteroauth/src/TwitterOAuth.php:667
I looked on the side of my firewall (which is not activated), but also on the side of the SSL certificate, I did not find much that could help me with TwitterOAuth ...
I am using Laravel workers, and some fail because they encounter this error while executing the job. Many pass but many also fail, and it is quite embarrassing.
Has anyone already encountered this problem (errno 104)?
Here, my PHP code:
Thanks, Maxence.