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

itemDataProcessing Out of memory #307

Open
ddennerline3 opened this issue Dec 10, 2024 · 6 comments
Open

itemDataProcessing Out of memory #307

ddennerline3 opened this issue Dec 10, 2024 · 6 comments

Comments

@ddennerline3
Copy link

Is your feature request related to a problem? Please describe.
When trying to import a large file, an out of memory condition is triggered. When reading through the code to find out which function may have caused the issue, there are no log message in https://github.com/ludeknovy/jtl-reporter-be/blob/master/src/server/controllers/item/shared/item-data-processing.ts#L40 to signal which part of the report import did complete. I have tried to increase memory to 24GB, but this doesn’t seem to be working. It’s not clear if the memory issue is the TS database or application server.

Describe the solution you'd like
Add log messages to itemDataProcessing() to help identify which parts of the critical pipeline didn't succeed due to exception.

Additional context
2024-12-10T13:13:21.463352447Z stdout F {"level":"error","message":"Processing of item 4d8da859-1c59-41eb-94b0-8d1fbeb256d3 failed DataProcessingException: Error while processing dataId: 4d8da859-1c59-41eb-94b0-8d1fbeb256d3 for item: 4d8da859-1c59-41eb-94b0-8d1fbeb256d3, error: error: Out of memory","timestamp":"2024-12-10 13:13:21"}

2024-12-10T13:13:21.463602841Z stdout F {"level":"error","message":"Error occurred during samples aggregation in database: Error while processing dataId: 4d8da859-1c59-41eb-94b0-8d1fbeb256d3 for item: 4d8da859-1c59-41eb-94b0-8d1fbeb256d3, error: error: Out of memory, item_id: 4d8da859-1c59-41eb-94b0-8d1fbeb256d3","timestamp":"2024-12-10 13:13:21"}

@ludeknovy
Copy link
Owner

Hi @ddennerline3 this definitely looks like postgres/timescaledb error. Please check the database logs.

@ludeknovy
Copy link
Owner

@ludeknovy
Copy link
Owner

@ddennerline3
Copy link
Author

ddennerline3 commented Dec 10, 2024

@ludeknovy Would it be possible to change the winston logger creation to support environment variable log level configuration please?

const logger = winston.createLogger({
  level: process.env.LOG_LEVEL || 'info', <<<<
  format: winston.format.json(),
  transports: [new winston.transports.Console()],
});

Our JTL reporter is cloud native deployment (Kubernetes) and changing sys logging levels is not something that is normally done.

@ludeknovy
Copy link
Owner

@ddennerline3 yes, but I guess the default would be debug.

@ludeknovy
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants