Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
0662384d
Unverified
Commit
0662384d
authored
Feb 03, 2018
by
Péter Szilágyi
Committed by
GitHub
Feb 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16009 from holiman/db_handles
cmd/utils: fix #16006 by not lowering OS ulimit
parents
b4e05adc
ec28a58c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
flags.go
cmd/utils/flags.go
+5
-3
No files found.
cmd/utils/flags.go
View file @
0662384d
...
...
@@ -714,13 +714,15 @@ func setIPC(ctx *cli.Context, cfg *node.Config) {
// makeDatabaseHandles raises out the number of allowed file handles per process
// for Geth and returns half of the allowance to assign to the database.
func
makeDatabaseHandles
()
int
{
if
err
:=
fdlimit
.
Raise
(
2048
);
err
!=
nil
{
Fatalf
(
"Failed to raise file descriptor allowance: %v"
,
err
)
}
limit
,
err
:=
fdlimit
.
Current
()
if
err
!=
nil
{
Fatalf
(
"Failed to retrieve file descriptor allowance: %v"
,
err
)
}
if
limit
<
2048
{
if
err
:=
fdlimit
.
Raise
(
2048
);
err
!=
nil
{
Fatalf
(
"Failed to raise file descriptor allowance: %v"
,
err
)
}
}
if
limit
>
2048
{
// cap database file descriptors even if more is available
limit
=
2048
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment