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 @@ -817,17 +817,12 @@ func setPrefix(ctx *cli.Context, cfg *node.Config) {
817817// MakeDatabaseHandles raises out the number of allowed file handles per process
818818// for XDC and returns half of the allowance to assign to the database.
819819func MakeDatabaseHandles () int {
820- limit , err := fdlimit .Current ()
820+ limit , err := fdlimit .Maximum ()
821821 if err != nil {
822822 Fatalf ("Failed to retrieve file descriptor allowance: %v" , err )
823823 }
824- if limit < 2048 {
825- if err := fdlimit .Raise (2048 ); err != nil {
826- Fatalf ("Failed to raise file descriptor allowance: %v" , err )
827- }
828- }
829- if limit > 2048 { // cap database file descriptors even if more is available
830- limit = 2048
824+ if err := fdlimit .Raise (uint64 (limit )); err != nil {
825+ Fatalf ("Failed to raise file descriptor allowance: %v" , err )
831826 }
832827 return limit / 2 // Leave half for networking and other stuff
833828}
You can’t perform that action at this time.
0 commit comments