Stripe Network Communication Error

My Stripe has been working fine until 4 days ago.

Now I am getting this error when the user submits the form:
Network communication failure with Stripe; please try again.

This is what I can see inside the Stripe Dashboard that it receives:

{
“type”: “card”,
“billing_details”: {
“email”: "xxx@xxx.com",
“name”: “Nolan xxx”
},
“card”: {
“number”: “************2351”,
“cvc”: “***”,
“exp_month”: “06”,
“exp_year”: “23”
},
“guid”: “c4xxxf1-efaa-488e-8xxx”,
“muid”: “7xxx13-f891-4285-b9ef-xxx”,
“sid”: “1fbxxx-4e24-429c-9040-dxxx”,
“payment_user_agent”: “stripe.js/14084d81; stripe-js-v3/14084d81”,
“time_on_page”: “113577”,
“referrer”: “https://xxx.com/”,
“key”: “pk_live_p8******************gSX8”
}

and this is what is sent back to my site:

{
“id”: “pm_1GZpfHIM6drDexxx”,
“object”: “payment_method”,
“billing_details”: {
“address”: {
“city”: null,
“country”: null,
“line1”: null,
“line2”: null,
“postal_code”: null,
“state”: null
},
“email”: "xxx@xxx.com",
“name”: “Nolan xxx”,
“phone”: null
},
“card”: {
“brand”: “mastercard”,
“checks”: {
“address_line1_check”: null,
“address_postal_code_check”: null,
“cvc_check”: null
},
“country”: “NZ”,
“exp_month”: xxx,
“exp_year”: xxx,
“funding”: “debit”,
“generated_from”: null,
“last4”: “xxx”,
“three_d_secure_usage”: {
“supported”: true
},
“wallet”: null
},
“created”: 1587350840,
“customer”: null,
“livemode”: true,
“metadata”: {
},
“type”: “card”
}

This is the entry and error get in the stripe.api log for the corresponding transaction:
Array
(
[user_id] => 0
[email] => xxx@xxx.com
[fname] => Nolan
[lname] => xxx
[metadata] => Array
(
)

[post_vars] => Array
    (
        [coupon] => 
        [first_name] => Nolan
        [last_name] => x
        [email] => xxx@xxx.com
        [username] => Testing
        [password1] => xxx
        [password2] => xxx
        [street] => 
        [city] => 
        [state] => 
        [zip] => 
        [country] => US
        [nonce] => c8axxb20xx
        [attr] => Array
            (
                [ids] => 0
                [exp] => 72
                [level] => 1
                [ccaps] => stripe
                [desc] => US$5 Monthly until cancelled
                [cc] => USD
                [custom] => xxx.com
                [ta] => 0
                [tp] => 0
                [tt] => D
                [ra] => 5
                [rp] => 1
                [rt] => M
                [rr] => 1
                [rrt] => 
                [modify] => 0
                [cancel] => 0
                [unsub] => 0
                [sp] => 0
                [register] => 0
                [update] => 0
                [accept] => Array
                    (
                    )

                [coupon] => 
                [accept_coupons] => 0
                [default_country_code] => US
                [captcha] => 0
                [template] => 
                [success] => 
                [validate_zipcode] => 0
                [collect_billing_address] => 0
                [collect_shipping_address] => 0
                [reject_prepaid] => 0
                [singular] => 9006
                [level_ccaps_eotper] => 1:stripe
            )

        [pm_id] => pm_1GZlxxxMVyKxxx
        [pi_id] => 
        [seti_id] => 
        [sub_id] => 
        [name] => Nolan xxx
        [_o_username] => Testing
        [recaptcha_challenge_field] => 
        [recaptcha_response_field] => 
    )

[input_time] => 1587333101

)

-------- Output string/vars: ( Sun, 19 Apr 20 21:51:41 +0000 ) --------
Stripe\Exception\ApiConnectionException Object
(
[error:protected] =>
[httpBody:protected] =>
[httpHeaders:protected] =>
[httpStatus:protected] =>
[jsonBody:protected] =>
[requestId:protected] =>
[stripeCode:protected] =>
[message:protected] => Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com.

(Network error [errno 2]: easy handle already used in multi handle)
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/HttpClient/CurlClient.php
[line:protected] => 374
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/HttpClient/CurlClient.php
[line] => 331
[function] => handleCurlError
[class] => Stripe\HttpClient\CurlClient
[type] => ->
[args] => Array
(
[0] => https://api.stripe.com/v1/customers
[1] => 2
[2] => easy handle already used in multi handle
[3] => 0
)

            )

        [1] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/HttpClient/CurlClient.php
                [line] => 267
                [function] => executeRequestWithRetries
                [class] => Stripe\HttpClient\CurlClient
                [type] => ->
                [args] => Array
                    (
                        [0] => Array
                            (
                                [47] => 1
                                [10015] => email=xxx%40xxx.com&name=Nolan+xxx&metadata[name]=Nolan+xxx&metadata[ip]=xxx.xx.171.171
                                [10002] => https://api.stripe.com/v1/customers
                                [19913] => 1
                                [78] => 30
                                [13] => 80
                                [10023] => Array
                                    (
                                        [0] => X-Stripe-Client-User-Agent: {"httplib":"curl 7.69.1","ssllib":"OpenSSL\/1.1.1f","bindings_version":"7.4.0","lang":"php","lang_version":"7.3.16","publisher":"stripe","uname":"Linux sxxx-xxx-127-7.secureserver.net 2.6.32-042stab133.2 #1 SMP Mon Aug 27 21:07:08 MSK 2018 x86_64","application":{"name":"WordPress s2Member Pro","partner_id":null,"url":"https:\/\/s2member.com","version":"200301"}}
                                        [1] => User-Agent: Stripe/v1 PhpBindings/7.4.0 WordPress s2Member Pro/200301 (https://s2member.com)
                                        [2] => Authorization: Bearer sk_live_3C1IxxxgPlLxFQxxxx
                                        [3] => Stripe-Version: 2019-10-08
                                        [4] => X-Stripe-Client-Telemetry: {"last_request_metrics":{"request_id":"req_aqxxxoWyxxxx","request_duration_ms":266}}
                                        [5] => Content-Type: application/x-www-form-urlencoded
                                        [6] => Expect: 
                                    )

                                [10065] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/data/ca-certificates.crt
                                [84] => 4
                                [20079] => Closure Object
                                    (
                                        [static] => Array
                                            (
                                                [rheaders] => Stripe\Util\CaseInsensitiveArray Object
                                                    (
                                                        [container:Stripe\Util\CaseInsensitiveArray:private] => Array
                                                            (
                                                            )

                                                    )

                                            )

                                        [this] => Stripe\HttpClient\CurlClient Object
                                            (
                                                [defaultOptions:protected] => 
                                                [userAgentInfo:protected] => Array
                                                    (
                                                        [httplib] => curl 7.69.1
                                                        [ssllib] => OpenSSL/1.1.1f
                                                    )

                                                [enablePersistentConnections:protected] => 1
                                                [enableHttp2:protected] => 1
                                                [curlHandle:protected] => Resource id #1687
                                                [requestStatusCallback:protected] => 
                                                [timeout:Stripe\HttpClient\CurlClient:private] => 80
                                                [connectTimeout:Stripe\HttpClient\CurlClient:private] => 30
                                                [randomGenerator] => Stripe\Util\RandomGenerator Object
                                                    (
                                                    )

                                            )

                                        [parameter] => Array
                                            (
                                                [$curl] => <required>
                                                [$header_line] => <required>
                                            )

                                    )

                            )

                        [1] => https://api.stripe.com/v1/customers
                    )

            )

        [2] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/ApiRequestor.php
                [line] => 365
                [function] => request
                [class] => Stripe\HttpClient\CurlClient
                [type] => ->
                [args] => Array
                    (
                        [0] => post
                        [1] => https://api.stripe.com/v1/customers
                        [2] => Array
                            (
                                [0] => X-Stripe-Client-User-Agent: {"httplib":"curl 7.69.1","ssllib":"OpenSSL\/1.1.1f","bindings_version":"7.4.0","lang":"php","lang_version":"7.3.16","publisher":"stripe","uname":"Linux sxxx-xxx-127-7.secureserver.net 2.6.32-042stab133.2 #1 SMP Mon Aug 27 21:07:08 MSK 2018 x86_64","application":{"name":"WordPress s2Member Pro","partner_id":null,"url":"https:\/\/s2member.com","version":"200301"}}
                                [1] => User-Agent: Stripe/v1 PhpBindings/7.4.0 WordPress s2Member Pro/200301 (https://s2member.com)
                                [2] => Authorization: Bearer sk_live_3C1I95O0CgPlLvFQxxx
                                [3] => Stripe-Version: 2019-10-08
                                [4] => X-Stripe-Client-Telemetry: {"last_request_metrics":{"request_id":"req_aqmlxxyytSx","request_duration_ms":266}}
                                [5] => Content-Type: application/x-www-form-urlencoded
                                [6] => Expect: 
                            )

                        [3] => Array
                            (
                                [email] => xxx@xxx.com
                                [name] => Nolan xxx
                                [metadata] => Array
                                    (
                                        [name] => Nolan xxx
                                        [ip] => xxx.xx.171.171
                                    )

                            )

                        [4] => 
                    )

            )

        [3] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/ApiRequestor.php
                [line] => 113
                [function] => _requestRaw
                [class] => Stripe\ApiRequestor
                [type] => ->
                [args] => Array
                    (
                        [0] => post
                        [1] => /v1/customers
                        [2] => Array
                            (
                                [email] => xxx@xxx.com
                                [name] => Nolan xxx
                                [metadata] => Array
                                    (
                                        [name] => Nolan xxx
                                        [ip] => xxx.xx.171.171
                                    )

                            )

                        [3] => Array
                            (
                            )

                    )

            )

        [4] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/ApiOperations/Request.php
                [line] => 62
                [function] => request
                [class] => Stripe\ApiRequestor
                [type] => ->
                [args] => Array
                    (
                        [0] => post
                        [1] => /v1/customers
                        [2] => Array
                            (
                                [email] => xxx@xxx.com
                                [name] => Nolan xxx
                                [metadata] => Array
                                    (
                                        [name] => Nolan xxx
                                        [ip] => xxx.xx.171.171
                                    )

                            )

                        [3] => Array
                            (
                            )

                    )

            )

        [5] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-sdk/lib/ApiOperations/Create.php
                [line] => 26
                [function] => _staticRequest
                [class] => Stripe\ApiResource
                [type] => ::
                [args] => Array
                    (
                        [0] => post
                        [1] => /v1/customers
                        [2] => Array
                            (
                                [email] => xxx@xxx.com
                                [name] => Nolan xxx
                                [metadata] => Array
                                    (
                                        [name] => Nolan xxx
                                        [ip] => xxx.xx.171.171
                                    )

                            )

                        [3] => 
                    )

            )

        [6] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-utilities.inc.php
                [line] => 125
                [function] => create
                [class] => Stripe\Customer
                [type] => ::
                [args] => Array
                    (
                        [0] => Array
                            (
                                [email] => xxx@xxx.com
                                [name] => Nolan xxx
                                [metadata] => Array
                                    (
                                        [name] => Nolan xxx
                                        [ip] => xxx.xx.171.171
                                    )

                            )

                    )

            )

        [7] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-checkout-in.inc.php
                [line] => 376
                [function] => get_customer
                [class] => c_ws_plugin__s2member_pro_stripe_utilities
                [type] => ::
                [args] => Array
                    (
                        [0] => 0
                        [1] => xxx@xxx.com
                        [2] => Nolan
                        [3] => xxx
                        [4] => Array
                            (
                                [name] => Nolan xxx
                                [ip] => xxx.xx.171.171
                            )

                        [5] => Array
                            (
                                [coupon] => 
                                [first_name] => Nolan
                                [last_name] => xxx
                                [email] => xxx@xxx.com
                                [username] => Testing
                                [password1] => xxx
                                [password2] => xxx
                                [street] => 
                                [city] => 
                                [state] => 
                                [zip] => 
                                [country] => US
                                [nonce] => c8axxb2xx3
                                [attr] => Array
                                    (
                                        [ids] => 0
                                        [exp] => 72
                                        [level] => 1
                                        [ccaps] => stripe
                                        [desc] => US$5 Monthly until cancelled
                                        [cc] => USD
                                        [custom] => xxx.com
                                        [ta] => 0
                                        [tp] => 0
                                        [tt] => D
                                        [ra] => 5
                                        [rp] => 1
                                        [rt] => M
                                        [rr] => 1
                                        [rrt] => 
                                        [modify] => 0
                                        [cancel] => 0
                                        [unsub] => 0
                                        [sp] => 0
                                        [register] => 0
                                        [update] => 0
                                        [accept] => Array
                                            (
                                            )

                                        [coupon] => 
                                        [accept_coupons] => 0
                                        [default_country_code] => US
                                        [captcha] => 0
                                        [template] => 
                                        [success] => 
                                        [validate_zipcode] => 0
                                        [collect_billing_address] => 0
                                        [collect_shipping_address] => 0
                                        [reject_prepaid] => 0
                                        [singular] => 9006
                                        [level_ccaps_eotper] => 1:stripe
                                    )

                                [pm_id] => pm_1GZl39Ixxev76xxx2
                                [pi_id] => 
                                [seti_id] => 
                                [sub_id] => 
                                [name] => Nolan xxx
                                [_o_username] => Testing
                                [recaptcha_challenge_field] => 
                                [recaptcha_response_field] => 
                            )

                    )

            )

        [8] => Array
            (
                [file] => /home/xxx/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-checkout.inc.php
                [line] => 58
                [function] => stripe_checkout
                [class] => c_ws_plugin__s2member_pro_stripe_checkout_in
                [type] => ::
                [args] => Array
                    (
                    )

            )

        [9] => Array
            (
                [file] => /home/xxx/public_html/wp-includes/class-wp-hook.php
                [line] => 287
                [function] => stripe_checkout
                [class] => c_ws_plugin__s2member_pro_stripe_checkout
                [type] => ::
                [args] => Array
                    (
                        [0] => 
                    )

            )

        [10] => Array
            (
                [file] => /home/xxx/public_html/wp-includes/class-wp-hook.php
                [line] => 311
                [function] => apply_filters
                [class] => WP_Hook
                [type] => ->
                [args] => Array
                    (
                        [0] => 
                        [1] => Array
                            (
                                [0] => 
                            )

                    )

            )

        [11] => Array
            (
                [file] => /home/xxx/public_html/wp-includes/plugin.php
                [line] => 478
                [function] => do_action
                [class] => WP_Hook
                [type] => ->
                [args] => Array
                    (
                        [0] => Array
                            (
                                [0] => 
                            )

                    )

            )

        [12] => Array
            (
                [file] => /home/xxx/public_html/wp-settings.php
                [line] => 540
                [function] => do_action
                [args] => Array
                    (
                        [0] => init
                    )

            )

        [13] => Array
            (
                [file] => /home/xxx/public_html/wp-config.php
                [line] => 95
                [args] => Array
                    (
                        [0] => /home/xxx/public_html/wp-settings.php
                    )

                [function] => require_once
            )

        [14] => Array
            (
                [file] => /home/xxx/public_html/wp-load.php
                [line] => 37
                [args] => Array
                    (
                        [0] => /home/xxx/public_html/wp-config.php
                    )

                [function] => require_once
            )

        [15] => Array
            (
                [file] => /home/xxx/public_html/wp-blog-header.php
                [line] => 13
                [args] => Array
                    (
                        [0] => /home/xxx/public_html/wp-load.php
                    )

                [function] => require_once
            )

        [16] => Array
            (
                [file] => /home/xxx/public_html/index.php
                [line] => 17
                [args] => Array
                    (
                        [0] => /home/xxx/public_html/wp-blog-header.php
                    )

                [function] => require
            )

    )

[previous:Exception:private] => 

)


I have deactivated all plugins to exclude any updated plugins as the culprit and get the same error.

My server info is:

|Server architecture|Linux 2.6.32-042stab133.2 x86_64|
|Web server|Apache|
|PHP version|7.4.2 (Supports 64bit values)|
|PHP SAPI|cgi-fcgi|
|PHP max input variables|10000|
|PHP time limit|300|
|PHP memory limit|256M|
|Max input time|1000|
|Upload max filesize|32M|
|PHP post max size|64M|
|cURL version|7.69.1 OpenSSL/1.1.1f|
|Is SUHOSIN installed?|No|
|Is the Imagick library available?|Yes|

WP Theme is OptimizePress 2.5.16

A WP Site health check reveals:

  1. Rest API Encountered and error:
    Error: cURL error 2: (http_request_failed)

  2. Site could not complete a loopback request:
    Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)

S2Member Paypal Buttons are working fine as well as Clickbank purchases are also still coming through fine.

PS - I did look at this topic but the error is different so a different issue:

Are you able to assist with some guidance with this issue as I have not been able to come up with an answer from my side.

Thank you for your help in advance
Nolan :slight_smile:

Try downgrading php to php7.3 and see if that helps. Not all plugins have yet been updated to PHP7.4. Would be surprised if s2member has. Lots of fussy changes from php7.3–>7.4 for little-to-no gain on legacy code.

Thank you fore the quick reply.

The site was on 7.3 so I upgraded to 7.4 to see if that made a difference, which it didn’t :’(

I have had s2member pro on a site for 2 years and it has been running well no problems. I have had new members and have received payments as usual. Then, yesterday a new person tried to sign up and they were given this message:
Network communication failure with Stripe; please try again

I have the error log if needed. I also called Stripe and spent quite some time with them to see if it is a problem in there - they say it is with s2member.

It has php version 7.0.33
Wordpress version: 4.9.8
And Disable Gutenberg plugin
All other plugins are updated and appear to be working well.

Ok, so I also contacted my server host to see if the php was updated and causing problems. I just got back their reply and this is what they said:

“The issue which you experienced with Stripe is due to a recent update of libcurl which was done automatically by the YUM package manager. I have downgraded the version and you should no longer experience the issue,”

I went back to the site and tried it and it does indeed work now and the test subscription went through fine. I hope that this info can help others.

1 Like

thanks for that. Can you please tel me exactly what was downgraded so I can do the same Linda

libcurl, sorry too early in the morning not reading properly, lol

No problem, I hope this is what was causing you problems so that it can be resolved. Consider the entire phrase that they used:

libcurl which was done automatically by the YUM package manager

1 Like

Nice catch Linda. This is one of the reasons I use IaaS cloud (AWS, Azure, etc) and not shared / managed hosts…they upgrade on their schedule not ours and they make changes without notifying people. Because they don’t manage the application tier they don’t test for application level consequences.

Thanks for sharing :slight_smile:

Sadly moving back to PHP 7.3 as well as downgrading curl as well as libcurl did not solve the problem for me.

Any other suggestion would be highly appreciated

All yum updates in the past week have now been rolled back but still no change :’(

Your original comment was “My Stripe has been working fine until 4 days ago.”

The rule of computing is “if tech works an then stops working…someone has touched something…find out who & what then reverse it.”

So you need to talk to your hosting company and ask what they did 4 days ago assuming you did not make any changes 4 days ago (upgraded plugin / WordPress).

Actually…your error log above shows it is a curl error. Talk to your hosting company.

I can see that the server did two automatic yum updates on the days when things stopped working. These are the updates that I rolled back without any luck.

I am seeing other folks reporting the same problem starting around the same time regarding other plugins so it isn’t a s2member only issue, but one that will affect others as well.

Did you restart your web server (apache / nginx) after the curl rollback? If you’re on shared hosting then that is problematic because you would share a web server. Given that you were able to rollback the curl update I will assume you have your own web server.

yes I did restart after each change before retesting. I have my own VPN via GoDaddy with only my own personal sites on it so any changes or updates I do don’t affect anybody else.

thank you for your help so far I do appreciate it. I have so far spent three days trying to sort this out so any help goes a long way to getting the $$$ coming back in at this crazy time.

It is still a curl issue. Talk to your hosting company again.

You are not alone. Do a search in Google for the following phrase from your logfile:

curl Network error [errno 2]: easy handle already used in multi handle

These guys all had the same problem starting at the same time as you. See https://wordpress.org/support/topic/curl-error-2-easy-handle-already-used-in-multi-handle/

See the following comment from that post…

This issue is currently resolved for us. The first thing that seemed to work was turning the cURL keep-alive off, so the handle was never reused.

I turned the keep-alive back on, and the site continues to work. This may have coincided with our web host rolling back the cPanel cURL version. Turns out the cURL error began after a cPanel update where cURL went from version 7.69.1 to 7.79.1.

Though our installed cURL package is version 7.19.7, PHP uses the cPanel version which is now back to 7.69.1.

I did find that topic today and did try to turn keep alive off then do a test purchase, then back on again with another test purchase. I did this via .htaccess as well as via httpd.conf, both with no success.
I have the same cURL package as them as well as PHP using 7.69.1

I try giving GoDaddy a call in the morning to see if they have a solution

Ok, checking in again. It is definitely the “libcurl which was done automatically by the YUM package manage” I hve a managed dedicated server with fastcomet. After I sent this info a couple days ago, the server host fixed it and I was able to sign up/pay/connect to stripe with no problems on a test account. Then, today, a new person tried to sign up and once again encountered the same problem as before. So, I copied off the info that you provided @onepresstech:

Start copy:

curl Network error [errno 2]: easy handle already used in multi handle

These guys all had the same problem starting at the same time as you. See https://wordpress.org/support/topic/curl-error-2-easy-handle-already-used-in-multi-handle/

See the following comment from that post…

This issue is currently resolved for us. The first thing that seemed to work was turning the cURL keep-alive off, so the handle was never reused.

I turned the keep-alive back on, and the site continues to work. This may have coincided with our web host rolling back the cPanel cURL version. Turns out the cURL error began after a cPanel update where cURL went from version 7.69.1 to 7.79.1.
End Copy

And then my server host just contacted me back with this info:

Start Copy:
“So what I have done is downgraded the libcurl version once more and have just excluded the libcurl from the automated updates in the YUM package manager so the issue should have subsided right now. Please test the matter and if still encounter such an issue,”
End Copy

I contacted stripe also and they do not show this issue showing up in their logs, so I can’t confirm with them.

I just received notifications from the client and stripe that she successfully signed up. So, I think that this may be the total solution for now. Hope that helps.

1 Like