You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working with a client who is using a rather modest EC2 instance (t2.medium) equipped with 2 vCPUs and 4GiB of RAM. We encountered a challenge while attempting to update their sitemaps - one sitemap per locale, each on its own subdomain. My initial approach was to utilize laravel-sitemap through Laravel's Artisan Tinker directly, without setting up any special configuration or creating dedicated controller methods/routes for this task.
Upon executing \Spatie\Sitemap\SitemapGenerator::create('https://clientwebsite.org')->getSitemap()->writeToDisk('public', 'sitemap-en.xml'); in Artisan's Tinker, the website crashed within 10 seconds, resulting in multiple 504 timeout errors. Monitoring the process with htop, I observed a spike in CPU usage that confirmed the strain on the server resources.
Does anyone have recommendations or workarounds for generating sitemaps in such an environment without overwhelming the server? I already tried to max out and increase the number of nginx workers with no help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm currently working with a client who is using a rather modest EC2 instance (t2.medium) equipped with 2 vCPUs and 4GiB of RAM. We encountered a challenge while attempting to update their sitemaps - one sitemap per locale, each on its own subdomain. My initial approach was to utilize laravel-sitemap through Laravel's Artisan Tinker directly, without setting up any special configuration or creating dedicated controller methods/routes for this task.
Upon executing
\Spatie\Sitemap\SitemapGenerator::create('https://clientwebsite.org')->getSitemap()->writeToDisk('public', 'sitemap-en.xml');
in Artisan's Tinker, the website crashed within 10 seconds, resulting in multiple 504 timeout errors. Monitoring the process withhtop
, I observed a spike in CPU usage that confirmed the strain on the server resources.Does anyone have recommendations or workarounds for generating sitemaps in such an environment without overwhelming the server? I already tried to max out and increase the number of nginx workers with no help.
Beta Was this translation helpful? Give feedback.
All reactions