CPU usage very high with ISR query logs every second.
Unanswered
Chinese Alligator posted this in #help-forum
Chinese AlligatorOP
Hello everyone,
I’m experiencing a critical issue with my JAMstack website use Next.js and Headless Wordpress. The ISR run every second in the logs in Netlify (the screenshot). Seems to be making requests to random URLs every second, even though these URLs likely have no active users. This continuous fetching is overloading the server. My site have around ~3000 page. I confirm every getStaticProps in source have revalidate at least 5min to 1h.
The current live site: https://trginternational.com
To debug the issues I created a cloned WordPress instance at https://jonash38.sg-host.com/wp-admin and connected it to staging frontend at https://trg-staging.netlify.app/. To make sure the issue not come from the source code like query loop.
The staging site works stably, fetching data quickly.
ISR logs show significantly fewer requests - only log what I query.
Server CPU usage remains low (<1000 units).
One key difference I’ve identified is the domain setup. The live site uses Cloudflare as its DNS provider, and I suspect there may be a conflict between Cloudflare’s CDN and the ISR function.
I’ve temporarily removed GTM from the live site as it previously caused high CPU usage and server downtime.
Robots have been disabled temporarily to see if they are contributing to the issue.
What I Need Help With:
Could the combination of ISR and Cloudflare’s CDN be causing this issue?
Are there known configurations or optimizations I should apply to reduce ISR’s impact on server resources?
Is there a better way to debug and prevent ISR from fetching random URLs unnecessarily?
Thank alot for your help.!
ps: I am at GTM+7 and maybe will reply this thread after 8h.
I’m experiencing a critical issue with my JAMstack website use Next.js and Headless Wordpress. The ISR run every second in the logs in Netlify (the screenshot). Seems to be making requests to random URLs every second, even though these URLs likely have no active users. This continuous fetching is overloading the server. My site have around ~3000 page. I confirm every getStaticProps in source have revalidate at least 5min to 1h.
The current live site: https://trginternational.com
To debug the issues I created a cloned WordPress instance at https://jonash38.sg-host.com/wp-admin and connected it to staging frontend at https://trg-staging.netlify.app/. To make sure the issue not come from the source code like query loop.
The staging site works stably, fetching data quickly.
ISR logs show significantly fewer requests - only log what I query.
Server CPU usage remains low (<1000 units).
One key difference I’ve identified is the domain setup. The live site uses Cloudflare as its DNS provider, and I suspect there may be a conflict between Cloudflare’s CDN and the ISR function.
I’ve temporarily removed GTM from the live site as it previously caused high CPU usage and server downtime.
Robots have been disabled temporarily to see if they are contributing to the issue.
What I Need Help With:
Could the combination of ISR and Cloudflare’s CDN be causing this issue?
Are there known configurations or optimizations I should apply to reduce ISR’s impact on server resources?
Is there a better way to debug and prevent ISR from fetching random URLs unnecessarily?
Thank alot for your help.!
ps: I am at GTM+7 and maybe will reply this thread after 8h.