@uixandy We’re sorry to hear you are experiencing this issue on your site.
We checked on your page-sitemap.xml file and do see that the page is returning a 504 error for that sitemap, but it is working as expected for the other sitemaps.
Can you please first confirm that the site has the necessary plugin requirements listed here?: Plugin Requirements.
If after confirming the plugin requirements the error is still occurring, it’s also possible that the 504 error is caused by that the resources required to generate the sitemap are not available, or the request is timing out due to the resource restrictions of the server environment.
We would first recommend ensuring that the PHP settings for both max_execution_time
and memory_limit
are set to a high enough value in the PHP environment. This setting is typically controlled by editing the values in a php.ini file such as in the following example:
max_execution_time = 300
memory_limit = 256M
If you aren’t sure how to change these settings in php.ini, we would recommend contacting your hosting provider for additional assistance.
If you are still receiving a 500 error after increasing the PHP memory and execution time, another possible cause is that the PHP script run time restriction on the server is being reached. In order to reduce the amount of time necessary for the script to generate the sitemap, you can reduce the number of entries in the sitemap. By default, the number of entries in the sitemap is set to 1000 but by decreasing this value it will decrease the amount of resources required to generate the sitemap.
To decrease the number of sitemap entries you can use the filter wpseo_sitemap_entries_per_page
. We have more information on using this developer filter at the following link: Limit the number of sitemap entries.
@devnihil Thanks for your reply. I changed max-execution-time to 5 minutes and memory limit to 1024M and I limited the sitemap to 100 entries and it still does not work.
-
This reply was modified 3 years, 8 months ago by
uixandy.
That’s very odd. In this case, we recommend you taking a look at the server’s error log to see if you can find anything related to the 504 timeout error. If you find anything related to it, please do feel free to share it here with us so that we can see what’s going on.
We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.