Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Remaining duration of <negativenumber> insufficient to load cluster

Open
#216 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, javascript
Domain
backend, cloud

Research direction

Start by tracing the Lambda code path that logs "Remaining duration ... insufficient to load cluster" and the call to context.getRemainingTimeInMillis(). Reproduce with the reported runtimes and timeout, then compare invocation timing with the batches table and request logs. Done means the cause of the negative value is identified and the loader no longer rejects a healthy invocation incorrectly.

Written by the indexing model from the issue text.

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.

Dominant language
JavaScript
Stars
595
Forks
161
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from awslabs/aws-lambda-redshift-loader

All issues in awslabs/aws-lambda-redshift-loader

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.