Random Google Pagespeed Insights Errors (no_fcp, Err_aborted, Deadline_exceeded) On Angular 17 Ssr With Nginx & Docker
The Problem: We are experiencing intermittent and random failures when running Google PageSpeed Insights (PSI) on our production and UAT environments. While tools like GTMetrix and KeyCDN report the site is healthy and fast, PSI frequently fails with a rotating set of errors: NO_FCP, ERR_ABORTED, NO_SCREENSHOT, and DEADLINE_EXCEEDED.
Environment:
Frontend: Angular 17 with
@angular/ssr.Infrastructure: Dockerized application behind an Nginx reverse proxy.
Hosting: AWS (likely Elastic Beanstalk).
Logic: The app uses
ipinfo.iofor geo-location and manages language/location slugs (e.g.,/en-in/). Logic is handled inapp.component.tsusing cookies and local storage (As per the requirement and project flow).
Symptoms & Timing Patterns:
Time-Sensitivity: The site passes PSI tests consistently at night (5 PM – 6 AM Only one the UAT servers, On the production 99% fails), scoring between 80-89. During business hours, it fails ~99% of the time on Production and intermittently on UAT.
Server Discrepancy: Production almost always fails. UAT and UAT2 show the "timing" issue more clearly.
Bot vs. User: The site handles ~50K users/month without issue. Only the PSI bot seems to trigger these "Aborted" or "Deadline" errors.
Payload Factor: A "lightweight" version of the page (terms and conditions) occasionally passes, whereas the heavy home page fails, even though the same redirection logic is present.
What we have already tried:
Standard Angular optimizations (Lazy loading, defer blocks, tree-shaking, minification).
Implementing server-side caching in
server.ts.Verified that no firewalls or WAFs are explicitly blocking Google bots.
Increasing Node.js memory limit to 4GB (
--max-old-space-size=4096).
Could the ipinfo.io request in app.component.ts be blocking the First Contentful Paint (FCP) in a throttled Lighthouse environment, even if it works fine on a fast desktop?
It could be a front-end issue? Or the server issue? If it is the server issue then what things we need to investigate further?
Also if someone knows why this timing related issues are happening even in the UAT servers please suggest that too.
Thank you
Popular Products
-
Wireless Health Tracker Smart Ring - R11$131.56$65.78 -
Electric Hair Straightener and Curlin...$161.56$80.78 -
Pet Oral Repair Toothpaste Gel$59.56$29.78 -
Opove M3 Pro 2 Electric Massage Gun$901.56$450.78 -
Portable Electric Abdominal Massager ...$45.56$22.78