0

When I check (https://www.readonlinenewspaper.com) site speed using PageSpeed Insights. I am not able to see and results and get an error message like below:

Lighthouse returned an error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_CONNECTION_FAILED)

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Rali Madhu
  • 1
  • 1
  • 2
  • I have tested your above page and it works fine. But you can always search to see some discussion already have like [here](https://stackoverflow.com/questions/53315575/lighthouse-failed-document-request) or [here](https://stackoverflow.com/questions/62801589/pagespeed-giving-err-connection-failed-only-on-production). – ShinaBR2 Jul 10 '20 at 01:49

1 Answers1

0

It is probably caused by one of two things

1. The site just takes too long to load.

Your page takes well over 40 seconds to load (on a high speed desktop connection, albeit in the UK and I am guessing this is somewhere else due to the long delay on requests.) so Page Speed Insights thinks it is broken as the page never completes loading within its timeout period.

Your country flags are the main cause of this, you should instead consider a CSS image sprite, or inline SVGs as the total of 438 requests on your page is so high you will never get good performance (generally only 8 requests can be made at once so that means you have over 50 round trips to your server for resources.)

If each set of eight resources takes 200ms to complete that is 10 seconds of latency (dead time waiting for a response) on its own, for me they were taking 800 to 1000 ms each!

This is particularly slow so perhaps there is something wrong with your hosting configuration or website setup? (You aren't storing the flag URLs in the database and looking them up one at a time in a loop by any chance are you?).

2. Hotjar

For some reason Page Speed Insights doesn't seem to play well with hotjar.

It is something to do with websockets but I never got to the bottom of it I just know that this is a problem I see often when people use hotjar and it is related to web sockets (maybe something to do with the wss:// protocol or their implementation).

Try disabling hotjar and run the test and see if it works then (perhaps test on another page when investigating this as it is only the homepage that is unbearably slow to load because of the flags as per point one).

p.s. the resource online-newspapers-banner-02.jpg is not being loaded over HTTPS so fix that, nothing to do with your question I just noticed the site was showing as "not secure" and I think that is the cause.

GrahamTheDev
  • 22,724
  • 2
  • 32
  • 64
  • I make my own website performance tool using the Google Page Speed Insights API. While I'm writing my code, I keep on testing google.com. After a day, I cannot use the API for google.com anymore, but it works on other domain like reddit.com, yahoo.com and etc. So in order to solve my problem I login to my Google Console and make a new Google Page Speed Insights API (I shutdown my first API then make a new one). Suddenly the google.com works again, probably it is some sort of penalty or limit in my API because I always test google.com? – Julio de Leon Oct 21 '20 at 09:58
  • no idea. As far as I am aware the only limitation is a throughput limitation of xx tests per minute, or 25,000 per day. Repeatedly testing Google shouldn't be an issue except if Google thinks you are a bot scraping the site, in which case it may IP block you. I suppose the answer is to stop testing Google, sorry I can't offer any more help than that. – GrahamTheDev Oct 21 '20 at 10:03