ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.9k stars 2.98k forks source link

Router crashes when Kubo is being used #9998

Open Jorropo opened 1 year ago

Jorropo commented 1 year ago

You can't access the internet when running Kubo ? Your router periodically stops for a few minutes when running Kubo ? Your internet is very slow when using Kubo ? You are in the right place !

You are puzzled by the amount of background connections and or traffic ? This is not here, please see discuss.ipfs.io.

Replaces https://github.com/ipfs/kubo/issues/3320

Known workarounds

No Reuseport

Try running with LIBP2P_TCP_REUSEPORT=false ./ipfs daemon and see if that is still happening.

No TCP

Try running with thoses config:

Doing a report

Please copy paste this template and fill in inside your message (feel free to omit unknown fields, just fill best effort thx):

- Router model:
- ISP:
- What OS are you running:
- Kubo version:
- Symptom experienced:
- Number Kubo open connections when the crash happen (number in ipfs-companion or `ipfs swarm peers | wc -l`):
- Did Disabling Reuseport fixed it:
- Did Disabling TCP fixed it:

Table

router model ISP OS Kubo version open connections reuseport fix TCP fix
thedavidmeister commented 1 year ago

--json for config not -json

emendir commented 3 months ago

In my experience, the problem seems to correlate with the number of IPFS peers the concerned node is connected to. The only effective way I have found so far for limited the number of nodes a peer is connected to is to disable the creation of new IPv4 connections by running the following command:

ipfs swarm filters add /ip4/0.0.0.0/ipcidr/0

Since keeping this configuration active seriously reduces IPFS connectivity, I created this project to automate its activation when the network performance shows signs of overloading, and deactivating it when the performance has reached its baseline again. Network performance is measured in latency via the average ping times to /ip4/8.8.8.8. The project also logs network performance and the number of IPFS peer IDs to a file for analysis, which you might find useful for filing reports here as described in the issue description above.

I encourage you to adapt this project for other network metrics and IPFS limitation measures you find useful and share your findings to help the community solve this issue which IPFS has.

https://github.com/emendir/IPFS-Monitor