The ipfs node is automatically shut down after running for a period of time

12:19:47.081 ERROR basichost: setting stream deadline: stream closed basic_host.go:242
12:29:59.297 ERROR basichost: resetting stream deadline: stream closed basic_host.go:271
12:30:41.527 ERROR basichost: setting stream deadline: stream closed basic_host.go:242
12:32:36.996 ERROR basichost: setting stream deadline: stream closed basic_host.go:242
12:38:10.433 ERROR basichost: setting stream deadline: stream closed basic_host.go:242
12:41:16.406 ERROR basichost: setting stream deadline: stream closed basic_host.go:242
12:41:49.633 ERROR basichost: setting stream deadline: stream closed basic_host.go:242

Received interrupt signal, shutting down…
(Hit ctrl-c again to force-shutdown the daemon.)
12:42:12.363 ERROR swarm2: swarm listener accept error: accept tcp6 [::]:4001: use of closed network connection swarm_listen.go:78
12:42:12.419 ERROR core: failure on stop: context canceled builder.go:47

I need some help

Something sent IPFS a signal to exit. What OS? You may have run low on
memory or something.

@shenhao do you use IPFS as systemd daemon? In this case, you probably should check your CPU/RAM quoting settings and set up the service to restart automatically on failure. The example is the following:

[Unit]
Description=IPFS single node control service - P2P distributed content-based CDN with file frontend
Documentation=https://docs.ipfs.io/
After=syslog.target network.target remote-fs.target nss-lookup.target


[Service]
Type=notify

Environment=IPFS_PATH=/util/ipfs
Environment=IPFS_LOGGING="info"
Environment=IPFS_CONFIG=/util/ipfs/config

#Runtime
ExecStartPre=/util/ipfs/ipfs-service.daemon umount
ExecStart=/util/bin/ipfs daemon --mount --enable-gc --migrate
TimeoutSec=60
User=ipfs
Group=ipfs
Restart=on-failure
RestartSec=10s
KillSignal=SIGINT

#Accounting
MemoryAccounting=true
MemoryHigh=4294967296
MemoryMax=6442450944
CPUAccounting=true
CPUQuota=200%
MemorySwapMax=1073741824

[Install]
WantedBy=multi-user.target