Problem/Motivation
Drupal site owners are seeing 429 responses from code.highcharts.com when running CI/CD. At Acquia, we have observed customer pipelines failing for this reason for both our Code Studio and our Pipelines CI/CD services.
Highcharts doesn't address rate limiting in their public-facing documentation; however, there are several threads in their forum. A Highcharts forum moderator made the following statements in one such forum thread:
You have probably hit the request limit. We've started enforcing our CDN fair-usage policy more strictly, which means that excessive requests to code.highcharts.com can result in rate limiting or temporary blocks.
For both development and production, we strongly recommend hosting Highcharts locally or installing it via npm. You can find more details and download options here: https://www.highcharts.com/download/
The intended usage of code.highcharts.com is browser-related usage. There are no fixed limits on our service, due to the variability of traffic. Limits fluctuate in real time based on current traffic, complexity, and system load.
In the composer.json file for the charts_highcharts sub-module, there are a number of repositories defined to download various JS files. Per forum feedback, using Composer to download these files during CI/CD is not a supported use case.
There appear to be two workarounds/alternatives: 1) Install with NPM or 2) Vendor the JS files.
I'm marking this issue as major as this module has implemented an unsupported use case that is causing deployments to fail.
Steps to reproduce
The issue isn't readily reproducible as a certain threshold of requests is needed to trigger 429 responses.
Proposed resolution
Remove support for Composer?
Leave support for Composer but caution re rate limiting?
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Comments
Comment #2
philsdev commentedThis is affecting our CI as well. In the meantime, we are going to try patching a site with the Cloudflare CDN equivalent links
eg: https://cdnjs.cloudflare.com/ajax/libs/highcharts/12.1.1/highcharts.min.js
Comment #3
andileco commentedHi! I apologize for not chiming in earlier, as I was away on vacation. I'll try to work on some wording that can go on the project page and some updates to the README.
Comment #4
pingwin4egThere's a related issue with a solution - #3575378-2: Rate limits on code.highcharts.com
Comment #5
andileco commentedI have created a MR at https://www.drupal.org/project/charts/issues/3575378. Please review. I am marking this ticket as duplicate, although I appreciate the quality of the description.