Skip to content

Fix: IPFS Kubo could use unlimited resources #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packaging/aleph-vm/etc/ipfs/kubo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
"Strategy": "roots"
},
"Swarm": {
"EnableHolePunching":false,
"EnableHolePunching": false,
"RelayService": {
"Enabled": false
},
"ResourceMgr": {
"MaxMemory": "1GB"
}
}
}
}
5 changes: 5 additions & 0 deletions packaging/aleph-vm/etc/systemd/system/ipfs.service
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ ProtectHome=true
RemoveIPC=true
RestrictSUIDSGID=true
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
# set memory limit to avoid taking all the CRN ressource and getting OOM
# https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgrmaxmemory
Environment=GOMEMLIMIT=1900m
MemoryHigh=2G
MemoryMax=4G

# enable for 1-1024 port listening
#AmbientCapabilities=CAP_NET_BIND_SERVICE
Expand Down
Loading