Skip to content

Failed while reading stream: Max execution time exceeded #3

@shivaprasad573

Description

@shivaprasad573

Hello, I am planning to use this component for my use case. So started Installed the docker-run using this

My OS details are

Ubuntu: 20.04
CPU:2 Cores
RAM: 4GB

Started the container using

docker run --detach --restart=always --publish 8088:8088 --volume /var/run/docker.sock:/var/run/docker.sock --env "API_ACCESS_TOKEN=my-token" --env "RUN_MAX_EXECUTION_TIME=1000"  glot/docker-run:latest

Then ran below cURL commands to know the server status and they worked fine

root@ubuntu:/home/ec2-user# curl http://localhost:8088
{
  "name": "docker-run",
  "version": "1.3.0",
  "description": "Api for running code in transient docker containers"
}

root@ubuntu:/home/ec2-user# curl --header 'X-Access-Token: my-token' http://localhost:8088/version
{
  "docker": {
    "version": "20.10.2",
    "apiVersion": "1.41",
    "gitCommit": "20.10.2-0ubuntu1~20.04.2",
    "goVersion": "go1.13.8",
    "os": "linux",
    "arch": "amd64",
    "kernelVersion": "5.8.0-55-generic",
    "buildTime": "2021-03-29T19:10:09.000000000+00:00",
    "platform": {
      "name": ""
    },
    "components": [
      {
        "name": "Engine",
        "version": "20.10.2"
      },
      {
        "name": "containerd",
        "version": "1.4.4-0ubuntu1~20.04.2"
      },
      {
        "name": "runc",
        "version": "1.0.0~rc95-0ubuntu1~20.04.1"
      },
      {
        "name": "docker-init",
        "version": "0.19.0"
      }
    ]
  }
}

Now, when in run the python code getting timeout exception even though I increase to 1000. Am I missing any other configurations?

root@ubuntu:/home/ec2-user# curl --request POST --header 'X-Access-Token: my-token' --header 'Content-type: application/json' --data '{"image": "glot/python:latest", "payload": {"language": "python", "files": [{"name": "main.py", "content": "print(42)"}]}}' http://localhost:8088/run
{
 "error": "limits.execution_time",
 "message": "Failed while reading stream: Max execution time exceeded"
}

Please help me to run the API's.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions