WordPress Infinite Loop
-
Hi all,
Architecture:
www.example.com webservers---subnet1--- |---example.com-aws-elb webservers---subnet2---cms.example.com webservers---subnet3--- |---example.com-aws-elb webservers---subnet4---We performed a fresh installation of WordPress using cms.example.com and it works as expected.
No plugin installed or enabled. No theme installed (default one used).
Default .htaccess with no customization, no additional configuration, WordPress is out of the box.The WordPress URL (WP_HOME) is cms.example.com.
The Site URL (WP_SITEURL)is cms.example.com.We keep the browser developer tools opened and there is no error there.
With this configuration, we can add new posts and see the content without difficulties.
Our setup:
On the Load Balancer, example.com-aws-elb, we created a new rules to redirect a specific path, blog, to cms.example.com webservers.
So when we hit http://www.example.com/blog, we reach cms.example.com webservers.
At this point, we can still post but when we land on a 404 wordpress page (Nothing here).To solve this problem, we update the Site URL (WP_SITEURL) in the WordPress settings from cms.example.com to http://www.example.com/blog.
Now, reaching http://www.example.com/blog gives WordPress index page as expected and it seems like everything works (no issues in the browser dev tools).
However, when we try to add or edit a post with this configuration, the post edit page load and doesn’t respond anymore.
Indeed, when we look at the browser dev tools, we can see that there is an infinity requests loop.This looks like:
"GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 200 5865 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 200 4628 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 200 204 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 200 5865 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 200 204 "https://cms.example.com/" "user-agent-stuff-here" "OPTIONS /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 200 4628 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here" "GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"We cannot add any new content, it is very slow and even if we can go through we get this message “Publishing failed. You are probably offline.”.
This behaviour renders WordPress useless.What cause this issue?
How can we solve this?
Is this achievable with our architecture?Thank you very much for your help!
The topic ‘WordPress Infinite Loop’ is closed to new replies.