• Resolved uixandy

    (@uixandy)


    Hey there, I am using Yoast SEO and the sitemaps work fine, except the page-sitemap.xml which is not loading. After some time it just shows a 504 Timeout.
    I already talked to premium support of my hosting and they can confirm, that hosting is fine and no errors.

    How can I fix this issue?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support devnihil

    (@devnihil)

    @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.

    Thread Starter uixandy

    (@uixandy)

    @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.
    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    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.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘page-sitemap.xml – 504 Gateway Timout’ is closed to new replies.