WP 5.6 Loopback Error Site Health

In WordPress 5.6, S2Member appears to be throwing a loopback error in the site health checks. Unfortunately, it is unclear why S2Member Pro seems to be causing this issue. (It occurred after installing Pro.) Is there any way to correct this.

Your site could not complete a loopback request
Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)

Just wondering, is s2Member still working even with the loopback error, or has it stopped working?

I haven’t yet upgraded to 5.6 but I’ve had the same loopback request error in the site health check for a while. It doesn’t specifically say what is throwing the error and I haven’t noticed any problems.

1 Like

S2Member seems to still work (I just retested) . The site is in progress so I do not have a lot of S2 integration yet to do a comprehensive test. The error occurs in WordPress with site health. (I have seen this on client sites and never could tell which plugin caused the issue. But I confirm that it is S2Member Pro that seems to cause the error. It was not 5.6.)

1 Like

Thanks for the reports, guys.

I’m using 5.6 and don’t have the loopback issue you mention…

Screenshot_2020-12-10%20Site%20Health%20Status%20%E2%80%B9%20s2Member%20Membership%20Plugin%20for%20WordPress%20%E2%80%94%20WordPress

Why do you suspect s2Member Pro on your site? What do I need to do to reproduce what you see?

Thanks. :slight_smile:

Thank you.
I will try to test further tomorrow.

  1. WP 5.6 updated. Site Health OK.
  2. Added S2Member Plugin and S2Member Pro Plugin (FTP).
  3. Site health reports loopback error and Needs Improvement. See image.

I know it is dangerous to assume one cause but this was the only change to this site in almost a year (other than regular updates).

I did setup S2Member basics (Login Screen and Membership Options). Pretty standard and simple stuff.

Occurs on more than one site.

Thanks for the new details.

I can’t reproduce the problem, I checked with two separate hosting services I use with s2Member. In one I tested with WP 5.7-alpha and still pass that test.

Maybe it’s a server thing? Have you checked with your hosting if they allow loopback requests?

Did you try google solutions to that wp issue? https://www.google.com/search?hl=en&q=wordpress%20loopback%20request%20failed

Here’s one: https://codeopolis.com/posts/wordpress-loopback-error/

I hope something there gives a hint to what’s behind that issue on your installation. Let me know how it goes. :slight_smile:

From what I read in this one, it could also be related to the SSL, DNS configuration, or cURL extension… https://wordpress.org/support/topic/curl-error-28-and-rest-api-call-failure-in-site-health-check/

The notice seems to happen for all kinds of plugins, and seemingly randomly, with some sites having a problem while others not for the same plugin. That seems to indicate that it’s not a plugin issue, but something about the server.

The SSL suggestion sounds interesting, because s2Member would be a plugin that tries to use HTTPS, while maybe no other plugins on your installation do.

I have a loopback error too, but different code:

image

I run a VPS with Nginx and I have 5 GB of RAM allocated to both Wordpress 5.6 and PHP-FPM 7.4

Never saw that error before. The plugin seems to be working normally so far, though.

Sorry for the delay. I was awaiting issuance of a SSL Cert to further test this.

Pattern

  1. Start with two working WP Websites (e.g., 5.6) with WP Site Health Status GOOD and minimal plugins (basic site). Assume almost identical, simple, installs and minimal plugins.
  2. Install S2Member Plugin from Wordpress Plugins
  3. Activate plugin
  4. Download and upload S2Member PRO via ftp
  5. Activate
  6. Assume basic S2Member minimal config (login page and member options page)
  7. LOOPBACK error starts–>WP Site Health Needs Work (see above error) loopback request failed
  8. Confirmed this exact problem on both new S2Member sites, both sites on same hosted server. Assume Site A and Site B.
  9. Install SSL cert on Site A.
  10. Updated .htaccess to force all traffic to Site A to HTTPS (e.g.,
    Header always set Content-Security-Policy: upgrade-insecure-requests
    RewriteEngine on
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  11. Rerun Site Health on Site A–GOOD
  12. Rerun Site Health on Site B–Needs Work (loopback error)
  13. Contact hosting firm and restart NGNX server.
  14. Rerun Site Health on Site A GOOD
  15. Rerun Site Health on Site B Yellow Needs Work (loopback error)
  16. Install SSL cert on Site B.
  17. Updated .htaccess to force all traffic to Site B to HTTPS (e.g.,
    Header always set Content-Security-Policy: upgrade-insecure-requests
    RewriteEngine on
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  18. Rerun Site Health on Site B–GOOD.

Throughout the above testing (even on site health error), S2Member itself, at least the basic functions that I use, appear to work.

Further testing, the .htaccess rules may be unnecessary to this problem (but I include it for completeness). Even if I switch back to the original .htaccess, still GOOD but AFTER the SSL Cert. Therefore, simply installing the SSL cert seems to work.

While I only have anecdotal evidence, this similar pattern occurred on at least one other site (a client site with their own S2Member Pro subscription and a separate physical server but at the same hosting company) after S2Member PRO installation.

Hope this helps. I did not look through the S2Member Code to see if there is something that assumes an SSL connection.

2 Likes

Nice. I am on Nginx too, but the .htaccess policies don’t apply to Nginx, only Apache (you may have the file, but at least in theory it should do nothing).

I have all my traffic redirected to https / 443 on my nginx conf files.

I am getting a different code, though, 403 (forbidden). I even edited my VPS hosts file to point my domain to my local host ip (internal). No luck there either.

s2Member is working normally, though (as far as I can see, of course).

Thanks for the update, Shannon. Nice job! I’m very glad you sorted it out. :slight_smile: :+1:

You need to edit nginx.conf, I also run nginx and PHP 7.4, no errors for me. Nginx.conf with s2member needs some special rules, search the forum here.

Have to try again, but php 8 breaks my site still. Will start looking which plugins or themes don’t work with it. PHP 8 is a major problem right now for most sites. Even WordPress only says it’s beta stage

2 Likes

Thanks all. I am embarrassed to admit this, but I never knew that the shared hosting provider switched from Apache to NGINX at some time–I have been with that host for ten years or so.

I don’t want to confuse newcomers, but the .htaccess on my specific hosting provider, even with NGINX, does work, and the config options in the .htaccess do affect the website. I just re-tested this and the .htaccess directives, e.g., Header always set Content-Security-Policy: upgrade-insecure-requests do apply to my shared hosting environment.

However, for newcomers, THIS IS NOT NORMAL as several other posters to this post accurately note. (With some additional research, there are apparently some unofficial tools that allow .htaccess directives on NGINX installs, but this functionality is not normally available. I suspect the hosting company offers this to smooth the transition from Apache to NGINX.)

2 Likes

Nice, @shannon! I guess they installed something to “translate” htaccess files. I believe I saw a couple of tutorials to do that back in the day, but I decided to just go ahead and start fresh with a full Nginx implementation without it.

Good to know @openmtbmap! I’ll take a look to see if I am missing anything!