precisely / web

1 stars 0 forks source link

DynamoDB throughput exceeded error during `yarn report:seed` #370

Closed aneilbaboo closed 5 years ago

aneilbaboo commented 5 years ago

web/app-backend ( dev) took 54s ➜ ENV=deploy yarn seed:reports
yarn run v1.12.3
$ yarn sls seed:reports
$ yarn env sls seed:reports
$ ENV=${ENV:-offline} ../env/withenv sls seed:reports
Loading deploy.env environment
servicePath: /Users/aneil/code/precisely/web/app-backend
Serverless: Generating offline settings
(node:29680) UnhandledPromiseRejectionWarning: ProvisionedThroughputExceededException: The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.
    at Request.extractError (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/protocol/json.js:48:27)
    at Request.callListeners (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at Request.emit (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/aneil/code/precisely/web/app-backend/node_modules/@aneilbaboo/dynogels/node_modules/aws-sdk/lib/request.js:38:9)
From previous event:
    at /Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:21:79
    at step (/Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:43:23)
    at Object.next (/Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:24:53)
    at /Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:18:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:14:12)
    at /Users/aneil/code/precisely/web/app-backend/src/db/scripts/commands/seed/reports.ts:20:33
    at Array.map (<anonymous>)
    at /Users/aneil/code/precisely/web/app-backend/node_modules/batch-promises/index.js:8:38
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
    at Function.Module.runMain (module.js:695:11)
    at Object.<anonymous> (/Users/aneil/code/precisely/web/app-backend/node_modules/ts-node/src/_bin.ts:182:12)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
(node:29680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:29680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.jsprocess with a non-zero exit code.

✨  Done in 76.76s.```
aneilbaboo commented 5 years ago

This is addressed by #373.

We may experience other batch loading issues in the future, however. Autoscaling is intended for gradually changing load. Batch loading will create spikes.