At the time of ordering, some websites started to display “Unexpected error communicating with Stripe … (Network error[errno 2] : easy handle already used in the multi handle) “. If you are facing such problem with your site, this article will show you how to fix it.
We got the message “Unexpected communication error with Stripe – Network error errno 2” suddenly on the website of one of my clients using Magento. The text entered as the error message was “If this problem persists, please let us know at email@example.com [ Network error errno 2] . This was an unusual error, as the error code was different from some of the error codes we were used to seeing.
From our findings, we understood that the problem is not explicitly related to Magento 2, but to the CURL version. For example, many people have reported on GitHub and Stack Overflow how their Stripe suddenly stopped working. Or their email system could not work and displayed the Network error[errno 2] . A discussion on GitHub shows that the issue is still being investigated. If you are using a different technology than Magento, you can check this link to understand how to fix the problem on your site.
If you encounter a network error[errno 2] on your website Magento 2 , which is preventing your band or payment method from working, you can do the following:
protected $enablePersistentConnections = true;
protected $enablePersistentConnections = false;
If you follow the steps above, you will find that your order will work fine.
From the discussion on the internet, some people were able to solve the problem by using either of these methods:
It is possible that the problem occurs on other modules of your website. From what I understand, setting the persistent connection / HTTP keep-alive to false will give you a temporary fix. As a member of the Stripe support team mentioned, the approach suggested above is a temporary fix. Internal investigations are still ongoing. I am making a comment here by GitHub . “Note, however, that this is only a workaround, not a proper fix, and is suboptimal, as it disables persistent connections (meaning that every request to Stripe’s API will create a new connection, resulting in additional latency) “.
Thanks for reading. Hope this article helps you save a few hours. If you need help with any of your Magento projects, you can Contact us .