Skip to content

Failed while reading stream: Max execution time exceeded #3

Open

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.

Activity

  1. AlexButeau commented on Sep 2, 2021

    @AlexButeau

    I have exactly the same issue. If someone knows why, any help would be greatly appreciated!

  2. urosjarc commented on Sep 26, 2021

    @urosjarc

    The same issue here :(

  3. francoarendholz commented on Nov 28, 2021

    @francoarendholz

    Same here, any hints meanwhile?

  4. matejrisek commented on May 2, 2022

    @matejrisek

    Oh I think I have the same issue, I've managed to narrow it down to nproc causing problems, why I still don't know.

    Have a look at my open issue -> #6

  5. SeaCKei commented on Aug 1, 2022

    @SeaCKei

    Have this been resolved?, im still having the same problem

  6. Oleg-Chubaka commented on Aug 17, 2023

    @Oleg-Chubaka

    I too had same issue.
    Even when I used recommended way of instalation.
    Tried stopping & starting docker-run.service, and different languages - it's all the same...

    ps: problem was solved after installing gVisor and adding runsc as default-runtime.

  7. cliffoo commented on Oct 8, 2024

    @cliffoo

    i was also able to get by with the gvisor setup.

    would be nice for the default recommended installation to work on its own. @prasmussen would you be able to take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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