Redocly/redocly-cli

Running out of CPU inside of containers

ldanielw1 opened this issue · 3 comments

When running inside of a container with an input file of 2.5M, I am experiencing that redocly just hangs while running CPU% to 100%. Was wondering if there's any chance that this is because of some node dependencies that are particularly CPU intensive...?

No .redocly.yaml file used for this build.

Redocly version: 1.12.2
Node version: 20.12.2

Hi @ldanielw1, what command are you trying to run? What are the arguments? What is the file type, what's the spec version? Any logs output?

command and args: redocly build-docs /tmp/swagger_internal.json -o tmp/internal_index.html
The swagger file is generated via the ruby gem rswag-api, version 2.13.0

The only logs that we see are:

Found undefined and using theme.openapi options
Prerendering docs
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping
Non existing security scheme referenced: BearerToken. Skipping

But those logs also appear when the build is successful on other machines (outside of containers)

It's hard to figure out what's wrong without a reproducible sample. The tool does not use any CPU-intensive dependencies. But during the execution of the build-docs command react content is being rendered into an HTML string, so I suppose it's the main reason for the high load.
Potentially this could be related to a Redoc memory issue.