Green Fireman
Green Fireman

Reputation: 697

Openwhisk: increase number of concurrent requests

I have a distributed Openwhisk setup, and when I try to execute more than 30 requests with one user at once, I get the following error:

error: Unable to invoke action 'prime-number': Too many concurrent requests in flight (count: 30, allowed: 30)

Any idea how I could increase this number?

Upvotes: 2

Views: 1186

Answers (3)

842Mono
842Mono

Reputation: 1988

If you are using the non-ansible method to run openwhisk, you can refer to the issue here. You can also refer to this.

You can modify the file core/standalone/src/main/resources/standalone.conf. If you look at this part:

config {
  controller-instances = 1
  limits-actions-sequence-maxLength = 50
  limits-triggers-fires-perMinute = 60
  limits-actions-invokes-perMinute = 60
  limits-actions-invokes-concurrent = 30
}

you can modify the value of limits-actions-invokes-concurrent and any of the other limits.

Then, when you run openwhisk, you need to supply the file through the -c parameter, through the --args parameter. Like so:

sudo ./gradlew core:standalone:bootRun --args='-c /path/to/openwhisk/core/standalone/src/main/resources/standalone.conf'

That's it.


You can also "build then run", like so:

sudo ./gradlew :core:standalone:build
sudo java -jar ./bin/openwhisk-standalone.jar -c /path/to/openwhisk/core/standalone/src/main/resources/standalone.conf

Upvotes: 0

Neeraj Mangal
Neeraj Mangal

Reputation: 36

Adding to @csantanapr answer, you can add them to openwhisk.yml playbook.

ansible-playbook -i environments/<environment>  -e limit_invocations_per_minute=999999 -e limit_invocations_concurrent=999999 openwhisk.yml

Upvotes: 1

csantanapr
csantanapr

Reputation: 5022

If you are using ansible method for deploying OpenWhisk, you can deploy with the following ansible-playbook environment variables override

-e limit_invocations_per_minute=999999 -e limit_invocations_concurrent=999999

If you are doing other type of deployment, the controller container needs to be deploy with the corresponding environment variables set to override any of these related values.

  "LIMITS_ACTIONS_INVOKES_PERMINUTE": "{{ limits.invocationsPerMinute }}"
  "LIMITS_ACTIONS_INVOKES_CONCURRENT": "{{ limits.concurrentInvocations }}"
  "LIMITS_TRIGGERS_FIRES_PERMINUTE": "{{ limits.firesPerMinute }}"
  "LIMITS_ACTIONS_SEQUENCE_MAXLENGTH": "{{ limits.sequenceMaxLength }}"

Upvotes: 3

Related Questions