Hello. s2member Pro subscriber. I’m working on resolving webhooks timing out issue. I have not had a successful webhook since August 31st. I do not recall doing any major updates/changes at that time. Here’s my progress so far.
1) Stripe notified me that webhooks have been failing since Sept 4th. Webhook: The URL of the failing webhook endpoint is: https://www.xxx.com/?s2member_pro_stripe_notify=1 . If I check my Stripe dashboard
2) If I access that URL, it returns a 200 network message (good). Relevant errors in my logs:
Safari/537.36
Array
(
[s2member_log] => Array
(
[0] => Unable to verify Webhook/IPN event ID. This is most likely related to an invalid Stripe configuration. Please check: s2Member → Stripe Options.
[1] => If you’re absolutely SURE that your Stripe configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables (and php://input) are populated; and that your server is able to connect to Stripe over an HTTPS connection.
[2] => s2Member uses the Stripe SDK for remote connections; which relies upon the cURL extension for PHP. Please make sure that your installation of PHP has the cURL extension; and that it’s configured together with OpenSSL for HTTPS communication.
[3] => array (
‘s2member_pro_stripe_notify’ => ‘1’,
Array
(
[customer_id] => cus_NvL3AjRmddE45
[subscription_id] => sub_1N9UNrPRddAj54IWcR0Xk
[input_time] => 16922357
)
-------- Output string/vars: ( Sat, 09 Sep 23 01:19:43 +0000 ) --------
Stripe\Exception\ApiConnectionException Object
(
[error:protected] =>
[httpBody:protected] =>
[httpHeaders:protected] =>
[httpStatus:protected] =>
[jsonBody:protected] =>
[requestId:protected] =>
[stripeCode:protected] =>
[message:protected] => Could not connect to Stripe (https://api.stripe.com/v1/customers/cus_NvlMAjRmE45). Please check your internet connection and try again. If this problem persists, you should check Stripe’s service status at https://twitter.com/stripestatus, or let us know at support@stripe.com.
(Network error [errno 7]: Failed to connect to api.stripe.com port 443: Connection timed out)
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /home/ecuser/xxxxx/lib/HttpClient/CurlClient.php
[line:protected] => 374
[trace:Exception:private] => Array
(
[0] => Array
(
- I contacted Dreamhost (my shared hosting provider). The first support analysis said 1) "Based from the server, it seemed to have been running out of PHP memory/RAM. Relevant logs below:
===
Thu Sep 7 19:50:02 2023 procwatch3 INFO: PID 394112 (php80.cgi) ecuser:pg1989116 - 103.7MB ram, 91.15 sec cpu: reniced to +10
Thu Sep 7 20:59:42 2023 procwatch3 INFO: PID 429162 (php80.cgi) ecuser:pg1989116 - 91.2MB ram, 90.83 sec cpu: reniced to +10
Thu Sep 7 21:10:46 2023 procwatch3 INFO: PID 23744 (php80.cgi) ecuser:pg1989116 - 103.8MB ram, 90.40 sec cpu: reniced to +10
Thu Sep 7 21:10:46 2023 procwatch3 INFO: PID 23744 (php80.cgi) ecuser:pg1989116 - 103.8MB ram, 90.40 sec cpu: reniced to +10
====
He also indicated that the log just suggests the site is not compatible with PHP 8.0[Thu Sep 07 21:20:34.015003 2023] [fcgid:warn] [pid 415754:tid 3804877063936] [client 69.172.186.13:58474] mod_fcgid: stderr: PHP Warning: Constant ABSPATH already defined in /home/ecxxxxx/xxxt.com/wp-config.php on line 40, referer: https://www.xxxxx.com/wp-admin/admin.php?page=ws-plugin--s2member-pro-stripe-ops
==
He suggests that I could update it to PHP8.1. He then referred me to second-level tech support.
4) They emailed me, asking me to test the connection to:
chameg:~# curl -I https://api.stripe.com , which is apparently hanging. They asked me to “have them look over the IP address: 69.163.152.129 To see if there are any blocks from their end”
5) Stripe confirms there are no blocks.
6) Dreamhost tech support comments:
I updated the sites max_execution_time to the below value if that helps:
max_execution_time = 500You can ask Stripe if they have any required PHP settings that we need to
configure. I also updated other directives via .phprc file to see if that helps.
7) These changes do not help. Webhooks continue to fail. I contact Stripe to see if there are any “required PHP settings” needed to be updated. I await a response. That’s where I stand today.
Hoping to get this resolved. If you have any insights, please let me know. Will update the post as I continue to work on it.