Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Too Many Requests #2

Closed
evgenykireev opened this issue May 15, 2018 · 4 comments
Closed

Too Many Requests #2

evgenykireev opened this issue May 15, 2018 · 4 comments

Comments

@evgenykireev
Copy link

evgenykireev commented May 15, 2018

When enabling this plugin, serverless deploy throws "Too Many Requests" error:

Serverless: Enabling API Gateway Content Encoding with minimum compression size = 0 bytes
 
  Serverless Error ---------------------------------------
 
  Too Many Requests
 
  Stack Trace --------------------------------------------
 
ServerlessError: Too Many Requests
    at BbPromise.fromCallback.catch.err (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:262:11)
From previous event:
    at persistentRequest (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:250:13)
    at doCall (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:206:9)
    at BbPromise (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:219:14)
From previous event:
    at persistentRequest (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:204:38)
    at Object.request.requestQueue.add [as promiseGenerator] (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:240:49)
    at Queue._dequeue (node_modules/promise-queue/lib/index.js:153:30)
    at node_modules/promise-queue/lib/index.js:109:18
From previous event:
    at Queue.add (node_modules/promise-queue/lib/index.js:94:16)
    at AwsProvider.request (node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:240:39)
    at ContentEncoding.createDeployment (node_modules/serverless-content-encoding/src/index.js:82:26)
    at enableContentEncoding.then (node_modules/serverless-content-encoding/src/index.js:104:112)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at getApiId.then.apiId (node_modules/serverless-content-encoding/src/index.js:104:96)
    at <anonymous>

I suppose it's because this plugin tries to redeploy stack right after initial deployment finishes.

@evgenykireev
Copy link
Author

evgenykireev commented May 15, 2018

Any reason why not to use CloudFormation MinimumCompressionSize attribute instead of createDeployment?

@msl-kabo
Copy link

I get this error as well

@evgenykireev
Copy link
Author

Meanwhile, I developed my own solution https://github.com/evgenykireev/serverless-api-compression which utilizes CloudFormation instead of API. It won't cause this error.

@dong-dohai
Copy link
Owner

dong-dohai commented Jun 6, 2018

hi @evgenykireev
Sorry for the really late response. I have been too busy lately.

Thanks for the solution suggestion. I have updated the plugin based on your suggestion and crediting you for it :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants