Skip to content

Commit

Permalink
Set number of open files limit to 200000
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej authored and brett19 committed Mar 17, 2024
1 parent 2c253fa commit f73a322
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deployment/dockerdeploy/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
units "github.com/docker/go-units"
"github.com/google/uuid"
"github.com/pkg/errors"
"go.uber.org/zap"
Expand Down Expand Up @@ -218,6 +219,11 @@ func (c *Controller) DeployNode(ctx context.Context, def *DeployNodeOptions) (*N
AutoRemove: true,
NetworkMode: container.NetworkMode(c.NetworkName),
CapAdd: []string{"NET_ADMIN"},
Resources: container.Resources{
Ulimits: []*units.Ulimit{
{Name: "nofile", Soft: 200000, Hard: 200000},
},
},
}, nil, nil, containerName)
if err != nil {
return nil, errors.Wrap(err, "failed to create container")
Expand Down

0 comments on commit f73a322

Please sign in to comment.