Increase open file (fd) limit if possible
This will decrease the risk of running out of file descriptors for the database and other bad things, which could otherwise potentially happen if we're serving lots of requests and scanning in parallel, etc. Windows doesn't have a per process open file limit like Unix so we don't need to worry about it there.
This commit is contained in:
17
lib/osutil/rlimit_windows.go
Normal file
17
lib/osutil/rlimit_windows.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (C) 2015 The Syncthing Authors.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// +build windows
|
||||
|
||||
package osutil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
func MaximizeOpenFileLimit() (int, error) {
|
||||
return 0, errors.New("not relevant on Windows")
|
||||
}
|
||||
Reference in New Issue
Block a user