# Limit memory usage

```typescript
htSdk.setMemoryUsageLimiterConfig({
  memoryUsageUpperThresholdMB: 500, // megabytes
  memoryUsageLowerThresholdMB: 400, // megabytes
  memoryCheckIntervalMs: 10, // Milliseconds
});
```

***memoryUsageUpperThresholdMB*** is the upper bound for memory. Hypertest will get disabled if your memory consumption goes above this value.

***memoryUsageLowerThresholdMB*** is the lower bound for memory. Hypertest will get enabled if your memory consumption goes below this value.

***memoryCheckIntervalMs*** is the value in milliseconds. Hypertest calls the `process.memoryUsage` API periodically with an interval of this value.

***memoryUsageUpperThresholdMB*** and ***memoryUsageLowerThresholdMB*** are required fields whereas ***memoryCheckIntervalMs*** has a default value of 10 milliseconds if you don't provide it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v2.hypertest.co/user-guides/node.js-sdk/limit-memory-usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
