-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker --ulimit does not support unlimited or large numbers #12515
Comments
Quite strange. import (
"log"
"os"
"os/exec"
"syscall"
"github.com/docker/docker/pkg/ulimit"
)
func main() {
u, err := ulimit.Parse(os.Args[1])
if err != nil {
log.Fatal(err)
}
r, err := u.GetRlimit()
if err != nil {
log.Fatal(err)
}
l := &syscall.Rlimit{Max: r.Hard, Cur: r.Soft}
if err := syscall.Setrlimit(r.Type, l); err != nil {
log.Fatal(err)
}
cmd := exec.Command("/bin/sh", "-c", "ulimit -c")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()
}
|
I can't reproduce, the latest master code works fine for me:
|
rather amusing behavior:
|
Yes, this is really weird... I wonder what commit fixed this... cc @LK4D4 @crosbymichael |
Issue is not solved with 1.6.1.
|
Yes, 1.6.1 only had security fixes. |
Closing since this issue is fixed on master. |
-1 trick does not work anymore: docker: Error response from daemon: json: cannot unmarshal number -1 into Go value of type uint64. |
Any update on this? docker-compose still returns this error:
|
I use next constant as workaround:
Comment from my code: ulimit -1 throws error as it uint64 now in docker codeso we use 2^63-1 number as equal value |
Probably an easy fix here: https://github.com/docker/go-units/blob/master/ulimit.go#L113 to support |
For those on this issue, setting -1 does appear to work as of Docker 1.13. |
While trying to get my containers to generate core file dumps, I ran into an issue setting the ulimit high enough. Would love an explanation, as I have no idea why upping to 1000000 doesn't seem to have an effect!
running on
The text was updated successfully, but these errors were encountered: