Hello,
I apologize for the issue you are facing with the 502 errors while using Rank Math. Here are some suggestions that may help reduce resource usage and potentially prevent these timeouts:
-
Optimize Your Database: Regularly clean up your database by removing unnecessary data such as post revisions, spam comments, and transient options. You can use a plugin for this or do it manually.
-
Limit Post Revisions: You can limit the number of post revisions stored in your database by adding the following line to your wp-config.php
file:
define('WP_POST_REVISIONS', 5);
This will keep only the last 5 revisions of each post.
-
Disable Unused Features: If there are features in Rank Math that you are not using, consider disabling them to reduce resource consumption. You can do this from the Rank Math dashboard.
-
Increase PHP Limits: Although you mentioned that your PHP limits meet recommendations, if possible, consider increasing them further. For example:
- PHP max input variables: 2000
- PHP time limit: 300
- PHP memory limit: 1024M
- Max input time: 300
-
Caching: Implement a caching solution to reduce server load. This can significantly improve performance and reduce the chances of timeouts.
-
Contact Hosting Provider: Since you are experiencing these issues specifically with Rank Math active, it might be beneficial to reach out to your hosting provider. They can check server logs for any specific issues or overloads that might be causing the 502 errors.
If you continue to experience issues after trying these suggestions, please reply to this ticket with any additional details or error messages you may have encountered, and a human agent from our support team will assist you further.
Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
How to Fix Indexing Issues in Google Search Console » Rank Math
Thank you for the information, but the result has been the same.
Could there be a conflict with our Divi theme? Why are so many custom fields added by the plugin? The amount of fields changes and deleting them only reappears. I wouldn’t expect these to appear here:
https://imgur.com/0lqbK9T
Thank you.
Hello,
To determine the root cause of the issue, please install the plugin Query Monitor on the affected website and look for slow queries related to Rank Math’s latest version.
Once done, share the screenshot of those so we can check further.
Looking forward to helping you.
Thank you for the assistance, as disabling Rank Math cures our ills.
Here is a slow query using the updated version..
https://imgur.com/yNZYXW8
I will continue testing to see if the 502 issue persists.
Thank you, again.
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
Looking forward to helping you.
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.