99x / 99x/serverless-dynamodb-local
Serverless eventually locks up when running for a while
- Dominant language
- JavaScript
- Stars
- 621
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
**Actual Behaviour**
Launching `serverless-offline` with `serverless-dynamodb-local` will always lock up after some seemingly random period of time. The terminal becomes unresponsive and there is no error or crash report.
**Expected Behaviour**
Run indefinitely.
**Steps to reproduce it**
I created a repo with a minimal project that has this behavior. https://github.com/robpc/dynamodb-local-test
If you follow the instructions in the example repo above and run the test script, the api will eventually will become unresponsive. Sometime it's been as early as 21 seconds in and sometimes it's as late as 10 minutes in. There appear to be periods of long delays (30-60 seconds) leading up to this point, but eventually it will be locked up and control-c has no effect. In my experience, it locks up the OS so badly a restart is required.
**LogCat for the issue**
No actual logs are shown, the process and serverless api lock up and are unresponsive.
Example output from the test linked above:
```
23:51 ✔ $ ./test.sh
Setup -- {"id":"1234","date":"4/11/2019, 10:52:18 PM"}
Press Q to exit.
0 Days, 00:00:21 -- #47 -- {"date":"4/11/2019, 10:52:18 PM","id":"1234"}
```
Example `serverless-offline` output from the project above
```
23:43 ✔ $ npm run start
> dynamodb-test@1.0.0 start /mnt/c/Users/Admin/projects/dunlin/dynamodb-test
> serverless offline start --migrate
Dynamodb Local Started, Visit: http://localhost:8000/shell
Serverless: DynamoDB - created table robpc-dynamodb-test-dev
Serverless: Starting Offline: dev/us-east-1.
Serverless: Routes for read:
Serverless: GET /api/test/{id}
Serverless: Routes for write:
Serverless: POST /api/test/{id}
Serverless: Offline listening on http://localhost:3000
Serverless: POST /api/test/1234 (λ: write)
Serverless: GET /api/test/1234 (λ: read)
Serverless: GET /api/test/1234 (λ: read)
Serverless: GET /api/test/1234 (λ: read)
Serverless: GET /api/test/1234 (λ: read)
Serverless: GET /api/test/1234 (λ: read)
...
```
Contributor guide
Research direction
Start with the minimal project linked in the issue, following its instructions and running ./test.sh or npm run start. Observe the delayed requests and eventual unresponsive state, then inspect the serverless-offline and serverless-dynamodb-local integration involved. Done means the API and terminal remain responsive during sustained operation without requiring a restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100