How to change maximum memory allowed for function in OpenWhisk

4/14/2018

I have an OpenWhisk deployment on a Kubernetees cluster that was done using [1]. I know I can change the memory limit for a function by adding --memory x when creating the function. However, if I try to set a value large than 512MB I get the following error.

requirement failed: memory 812 MB exceeds allowed threshold of 536870912 B (code 10543)

I assume this is a configuration set during the setup or within the code. Is there a way to increase this limit to a custom value? if so what is the configuration I need to perform in order to do this?

[1] https://github.com/apache/incubator-openwhisk-deploy-kube

-- pulasthi
docker
kubernetes
openwhisk

2 Answers

4/14/2018

The memory limits are configurable for your deployment as of this patch https://github.com/apache/incubator-openwhisk/pull/3148. You can set the max memory in your deployment to suite your purposes.

-- user6062970
Source: StackOverflow

4/18/2018

You have to set the environment variable CONFIG_whisk_memory_max=1073741824 on the invoker with a higher value for example 1GB One way to edit the invoker deployment file https://github.com/apache/incubator-openwhisk-deploy-kube/blob/master/kubernetes/invoker/invoker-dcf.yml#L74

- name: "CONFIG_whisk_memory_max"
  value: "1073741824"
-- csantanapr
Source: StackOverflow