openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodric Rabbah <>
Subject Re: What to do when an action cannot continue?
Date Sun, 18 Mar 2018 11:35:42 GMT
The memory limits are imposed “from outside” the container. If an action exceeds its allocated
max memory the container is killed (by docker) and the invoker detects the reason as OOM.
The invoke of the action will result in a new container and process.

In general if an action dies, the expectation is that the http connection to the container
from the invoker is severed. This indicates an error that reclaims the container. 

If you want to handle the error inside the container and return an error response (instead
of just failing completely) then you’ll need to detect the process died and recover it.
I’m not sure it’s worth the complexity to do that compared to what the system already


> On Mar 18, 2018, at 7:27 AM, Michele Sciabarra <> wrote:
> Scenario: an action (in this case a Go action but it can be in any language actually)
find a condition where it cannot continue. For example, an out-of-memory (not at all usual
in the constrained environment where an action is executed). What to do then?
> I want the action to be destroyed and recreated but how do I notify the error condition
when an "/run" is executed? What happens if I return an error code different that 200? 
> In my case, I am trying to decide what to do when the proxy detects that the underlying
process died. I am wondering if there are conditions when I should try to restart it or I
do better to ask to the Invoker to get rid of the corpse and create a new one.
> -- 
>  Michele Sciabarra

View raw message