Replies: 2 comments
-
The answer here |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Myerden I too am facing the same issue with over 2,000 dynamic blog pages. My CPU of my server is maxing out at 100% trying to generate, is there a way to "chunk" generate? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
At first, thank you for developing this library.
I am running two Angular2+ project and a laravel api on my server together. The first angular project is a public website for users (SSR enabled), the second angular project is Admin Panel, these two projects runs on laravel api. I have a strange problem with sitemap creation.
The problem;
Sitemap creation process is taking too much time (apr. 70 seconds)
This problem occurred after enabling server side rendering on my angular project. If I disable SSR, the problem not occurs.
While angular ssr project is running based on Node.js, sitemap creation process increases Node.js resource usage (CPU up to 85%) and therefore this process takes 1 minute to complete. This is strange because laravel is running on apache server and admin can create sitemap, because of ssr is not enabled for admin panel, it shouldn't be related with Node.js server.
Here is my ssr enabled angular project (when idle):
Here is my process list:
This ss taken when executing following code:
$sitemap = SitemapGenerator::create($website->url)->getSitemap();
As you can see Node process is consuming all cpu resource.
How did I understand sitemap generation is getting slow the performance?
Sitemap generation code here:
If I comment the
$sitemap = SitemapGenerator::create($website->url)->getSitemap();
line the request is finished in 2 seconds otherwise it is finished in 70 seconds. While this code is executing, Node.js cpu usage is hitting up.And also if I stop the ssr with terminal
sudo pm2 stop ssr.website
, I can generate my sitemap in 2 seconds.So what kind of relation exists between this library and Node.js process?
Is this an Apache bug?
Is this a Node.js bug? or something related with this library?
My Apache configuration file for ssr enabled website:
My Apache configuration file for laravel api:
My environment;
Node v10.22.0
Apache v2.4.29
PHP v7.4.14
Laravel v6.0
Laravel Sitemap v5.5
Server;
Ubuntu Server - 18.04.4
8 GB RAM
Thank you
Beta Was this translation helpful? Give feedback.
All reactions