Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document environment variables for logging node heap stats #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ The environmental variables for the clearlydefined-api-dev App Service include:
* HARVEST_QUEUE_PREFIX
* HARVEST_QUEUE_PROVIDER
* HARVESTER_PROVIDER
* LOG_NODE_HEAPSTATS
* LOG_NODE_HEAPSTATS_INTERVAL_MS
* NODE_ENV
* RATE_LIMIT_MAX
* RATE_LIMIT_WINDOW
Expand Down Expand Up @@ -535,6 +537,29 @@ This is the prefix we use for queues that we use for harvesting. In this case, i

This indicates what type of service we use for harvesting, in this case it's **crawlerQueue**, which corresponds with the [crawlerQueue harvest provider](https://github.com/clearlydefined/service/blob/master/providers/harvest/crawlerQueue.js)

**LOG_NODE_HEAPSTATS**
This is an optional flag to `enable` logging of Node's `v8` module's memory usage data using the `getHeapSpaceStatistics` and `getHeapStatistics()` functions.

Value is either `true` or `false`
> Note: if this env var is not present, it equates to `false`

> example:
> `LOG_NODE_HEAPSTATS` = `true`

- [Node.js v8 engine docs - getHeapSpaceStatistics()](https://nodejs.org/docs/v22.12.0/api/v8.html#v8getheapspacestatistics)

- [Node.js v8 engine docs - getHeapStatistics()](https://nodejs.org/docs/v22.12.0/api/v8.html#v8getheapstatistics)

**LOG_NODE_HEAPSTATS_INTERVAL_MS**

This is an optional environment variable that sets the interval to log heap statistics (When enabled).

Value is a number in `ms` (`milliseconds`).
> NOTE: The default value is `30000` ms (`30` seconds)

> example:
> `LOG_NODE_HEAPSTATS_INTERVAL_MS` = `10000`

**MULTIVERSION_CURATION_FF**

This is a feature flag that indicates whether the [Multi-version curation feature](https://github.com/clearlydefined/service/pull/810) is active.
Expand Down
Loading