elastic / elastic/apm-agent-nodejs
Memory Problem
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
**Describe the bug**
Hello.
After very short time of using APM our service goes out of memory. Without using APM we have constant usage of 30 - 50 MB. After adding APM agent it is from 30MB at start until it crashes. Can you help me please?
Thank you.
**Environment**
- OS: Linux / Docker
- Node.js version: node:10.16.0
- Agent version: 2.16.2
Version: ["elastic-apm-node": "^2.16.2",]
We are using APM with koa based service.
Usage:
```typescript
require('elastic-apm-node').start({
serviceName: 'Name of service',
serverUrl: 'http://172.17.0.1:8200',
active: process.env.NODE_ENV === 'production'
});
```
Custom midlleware:
```typescript
const apm = require('elastic-apm-node');
export async function apmMiddleware(ctx, next) {
apm.setTransactionName(`${ctx.request.method} ${ctx.request.url}`);
await next();
}
```
Contributor guide
Assessment
This issue has not been assessed yet.