File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -824,17 +824,12 @@ func setIPC(ctx *cli.Context, cfg *node.Config) {
824
824
// makeDatabaseHandles raises out the number of allowed file handles per process
825
825
// for Geth and returns half of the allowance to assign to the database.
826
826
func makeDatabaseHandles () int {
827
- limit , err := fdlimit .Current ()
827
+ limit , err := fdlimit .Maximum ()
828
828
if err != nil {
829
829
Fatalf ("Failed to retrieve file descriptor allowance: %v" , err )
830
830
}
831
- if limit < 2048 {
832
- if err := fdlimit .Raise (2048 ); err != nil {
833
- Fatalf ("Failed to raise file descriptor allowance: %v" , err )
834
- }
835
- }
836
- if limit > 2048 { // cap database file descriptors even if more is available
837
- limit = 2048
831
+ if err := fdlimit .Raise (uint64 (limit )); err != nil {
832
+ Fatalf ("Failed to raise file descriptor allowance: %v" , err )
838
833
}
839
834
return limit / 2 // Leave half for networking and other stuff
840
835
}
You can’t perform that action at this time.
0 commit comments