awslabs / awslabs/aws-lambda-redshift-loader
Remaining duration of <negativenumber> insufficient to load cluster
- Dominant language
- JavaScript
- Stars
- 595
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
**Setup**
Runtime 10.x and 12.x
Timeout 2mins 30 seconds
**Error Details**
2020-08-12T13:48:12.102+01:00
START RequestId: 1a5aa337-9f84-5f13-9486-f49a78bcbb46 Version: $LATEST
2020-08-12T13:48:12.115+01:00
info: Failing Batch 48e2e469-2fbd-4e98-99c6-9b028831a612 due to "Remaining duration of -89145 insufficient to load cluster"
2020-08-12T13:48:12.458+01:00
END RequestId: 1a5aa337-9f84-5f13-9486-f49a78bcbb46
REPORT RequestId: 1a5aa337-9f84-5f13-9486-f49a78bcbb46 Duration: 355.01 ms Billed Duration: 400 ms Memory Size: 256 MB Max Memory Used: 103 MB
I confirmed that the Remaining duration of -89145 insufficient to load cluster did pertain to the same request 1a5aa337-9f84-5f13-9486-f49a78bcbb46 by checking the batches table.
**Expected Behaviour**
Given that the Lambda timeout was well above the execution time of the request, it's expected that the function has well above adequate time to execute.
Based on the log statements above, this suggests that the call to context.getRemainingTimeInMillis() function returned **-89145**, **13ms** after request invocation.
This occurred 3 times out of 48 batches in my test envrionment.
Contributor guide
Assessment
This issue has not been assessed yet.