codewithkyle / craft-lightkeeper

Continuous performance monitoring for your Craft CMS websites.
MIT License
8 stars 0 forks source link

Lighthouse/Puppeteer Issues #6

Closed codewithkyle closed 3 years ago

codewithkyle commented 4 years ago

Description

Sometimes one or more of the audit values return null while the others return correctly.

The Lighthouse Audit widget currently fails whenever any of the values return null and the widget reports that the page must be publicly visible. This error is not always correct. Typically values will return null when the user is trying to audit a page that is only accessible on their local network, however, it appears that due to issues with the Lighthouse or Puppeteer npm packages some of the audits break. We should consider only erroring out the entire audit when all the values return null while adding individual errors per audit in order to handling the any current bug while Google works on fixing their packages.

We should also consider updating the logs to track when one or more but not all the audits fail. We may need to adjust the Puppeteer script or create an issue with the Google team.

codewithkyle commented 4 years ago

This doesn't seem to be an issue after I upgraded the server. Scores are still slightly less than the values displayed on web.dev so we may need to look into upgrading the server again to include even more RAM.

codewithkyle commented 3 years ago

Some issue are continuing to appear when the lightkeeper server is spawning several Puppeteer instances at the same time. Current ideas to solve the issues:

  1. Try to open incoming URLs in new "tabs" instead of launching a new instance.
  2. Build a request queue and only process one URL at at time.
  3. Move audit functionality into AWS Lambda.
codewithkyle commented 3 years ago

Requests are no longer being dropped after switching to a request queue that shares one Puppeteer instance however performance scores are still a few points below what web.dev shows. The cause of this might be because of different Lighthouse versions:

codewithkyle commented 3 years ago

See #10