apache / apache/openwhisk

Controlling termination time for warm containers.

Open
#5,143 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

I'm using standalone openwhisk with functions running inside container. I created actions in python referring https://github.com/apache/openwhisk/blob/master/docs/actions-python.md
When the action is invoked first time, the container starts in cold mode and then continues to run for some time (around 10 mins) without exiting. If any request comes within this time then request is served by the warm container.
How can I make the container exit immediately after it serves each request i.e how can I make this container always start in cold mode for each and every request.
Additionally I tried using ttl field in runtimes.json file for python to control when the warm container terminates but it doesnt seem to work. ttl of 5 mins and 2 mins are not making any difference on when the warm container terminates.

## Environment details:

* local deployment
* ubuntu 18.04

Contributor guide

Open the contributing guide

Research direction

Start with the Python action guidance in docs/actions-python.md and the Python runtime entry in runtimes.json, then trace how the runtime's ttl setting is applied during local container invocation. Reproduce the warm-container behavior in the reported local Ubuntu 18.04 deployment and verify that the documented termination setting produces the expected cold start on each request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.