2

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?

Green Fireman
  • 617
  • 1
  • 11
  • 27

3 Answers3

3

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 }}"
csantanapr
  • 5,002
  • 2
  • 19
  • 15
  • Where exactly do I add `-e limit_invocations_per_minute=999999`? Or how do I set the environment variables of the controller container? ...I am using gradle to run my openwhisk. Does that mean that I'm using the ansible method? – steoiatsl Nov 26 '21 at 01:53
  • I tried modifying `ansible/roles/controller/tasks/deploy.yml` but no luck. – steoiatsl Nov 26 '21 at 02:14
1

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
  • Where exactly do I add `-e limit_invocations_per_minute=999999`? Which file? I don't think we add it to `openwhisk.yml` itself. – steoiatsl Nov 26 '21 at 01:59
0

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
steoiatsl
  • 1,892
  • 2
  • 22
  • 39