influxdata / influxdata/kapacitor
Panic: out of memory when running replay from HTTP API
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
When running a live batch replay from the HTTP API, kapacitord takes up all the memory and crashes. This happens with any script.
For instance:
TICKscript:
batch
|query('''SELECT LAST(temperature) as temperature FROM "db"."autogen".data''')
.period(5m)
.every(5m)
When running HTTP API (/kapacitor/v1/replays/batch", json={'past': '5m', 'task': 'task'}) it will crash with out of memory
When running from CLI everything is ok: kapacitor replay-live batch -task task -past 5m
Contributor guide
Research direction
Start by reproducing the batch replay through the HTTP API endpoint /kapacitor/v1/replays/batch with the provided task, past window, and TICKscript, then compare it with the CLI command kapacitor replay-live batch -task task -past 5m. Trace the two replay entry points and identify why the HTTP path consumes unbounded memory; done means the API replay completes without an out-of-memory crash like the CLI path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100