Skip to content

Commit 8dee2e8

Browse files
authored
FRIDGE-1084 Change default concurrency limit (#517)
* fix: change default concurrency to 10 * chore: update readme * chore: changesets
1 parent cdf9e3a commit 8dee2e8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.changeset/sour-goats-help.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@twilio-labs/plugin-serverless': patch
3+
'@twilio-labs/serverless-api': patch
4+
---
5+
6+
Change default concurrency limit from 50 to 10

packages/plugin-serverless/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ USAGE
4343
### Concurrency
4444

4545
When deploying lots of Functions and Assets it is possible to run up against the enforced concurrency limits of the Twilio API. You can limit the concurrency and set how many times the library retries API requests using environment variables.
46-
47-
The default concurrency is 50 and the default number of retries is 10. You can change this by setting environment variables. The following would set concurrency to 1, only 1 live request at a time, and retries to 0, so if it fails it won't retry.
46+
It is advisable to keep the concurrency low (around 10-15) to avoid hitting the rate limits of the Twilio API.
47+
The default concurrency is 10 and the default number of retries is 10. You can change this by setting environment variables. The following would set concurrency to 1, only 1 live request at a time, and retries to 0, so if it fails it won't retry.
4848

4949
```sh-session
5050
export TWILIO_SERVERLESS_API_CONCURRENCY=1

packages/serverless-api/src/api/utils/http_config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if (typeof retryLimit === 'undefined') {
55

66
let concurrency = process.env.TWILIO_SERVERLESS_API_CONCURRENCY;
77
if (typeof concurrency === 'undefined') {
8-
concurrency = '50';
8+
concurrency = '10';
99
}
1010

1111
export const RETRY_LIMIT = parseInt(retryLimit, 10);

0 commit comments

Comments
 (0)