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:
Jakob Borg
2015-08-15 15:20:58 +02:00
parent 5e5eb9bf8e
commit 1c9513e770
3 changed files with 69 additions and 0 deletions

View 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")
}