mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
server: Set rLimit properly to the max. (#1676)
4000 is too small to handle 500 go-routines. Fixes #1666
This commit is contained in:
parent
2da34e4668
commit
b69a97aed4
@ -29,9 +29,10 @@ func setMaxOpenFiles() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Safe limit to be set on all platforms.
|
// Set the current limit to Max, it is usually around 4096.
|
||||||
rLimit.Max = 4000
|
// TO increate this limit further user has to manually edit
|
||||||
rLimit.Cur = 4000
|
// `/etc/security/limits.conf`
|
||||||
|
rLimit.Cur = rLimit.Max
|
||||||
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user