mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -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 {
|
||||
return err
|
||||
}
|
||||
// Safe limit to be set on all platforms.
|
||||
rLimit.Max = 4000
|
||||
rLimit.Cur = 4000
|
||||
// Set the current limit to Max, it is usually around 4096.
|
||||
// TO increate this limit further user has to manually edit
|
||||
// `/etc/security/limits.conf`
|
||||
rLimit.Cur = rLimit.Max
|
||||
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user