# IPFS server keeps crashing

**URL:** https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777
**Category:** Kubo
**Created:** [November 29, 2021, 9:10am UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777 "2021-11-29T09:10:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![PDVJAM](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@PDVJAM](https://discuss.ipfs.tech/u/PDVJAM)
#### Post date: [November 29, 2021, 9:10am UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777/1 "2021-11-29T09:10:44Z")

</div>

Hey! We have a go-ipfs server with built-in s3 support plugin. And it works well except that the sever killed regularly, many times a day.

In logs I see:

```auto
Nov 29 05:18:05 IPFS-node-03 systemd[1]: ipfs.service: Main process exited, code=killed, status=9/KILL
Nov 29 05:18:05 IPFS-node-03 systemd[1]: ipfs.service: Failed with result 'signal'.
Nov 29 05:18:05 IPFS-node-03 systemd[1]: ipfs.service: Scheduled restart job, restart counter is at 31.
Nov 29 05:18:05 IPFS-node-03 systemd[1]: Stopped IPFS Daemon.
Nov 29 05:18:05 IPFS-node-03 systemd[1]: Started IPFS Daemon.
Nov 29 05:18:05 IPFS-node-03 ipfs[419597]: Initializing daemon...
Nov 29 05:18:05 IPFS-node-03 ipfs[419597]: go-ipfs version: 0.11.0-dev-5a61bedef-dirty
Nov 29 05:18:05 IPFS-node-03 ipfs[419597]: Repo version: 11
Nov 29 05:18:05 IPFS-node-03 ipfs[419597]: System version: amd64/linux
Nov 29 05:18:05 IPFS-node-03 ipfs[419597]: Golang version: go1.16.8
Nov 29 05:18:06 IPFS-node-03 ipfs[419597]: 2021/11/29 05:18:06 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 >

```

I also see some S3 access errors, but they are not time-related to the moment when the server got killed:

```auto
Nov 29 05:59:28 IPFS-node-03 ipfs[419597]: 2021-11-29T05:59:28.513Z ERROR engine decision/blockstoremanager.go:92 blockstore.GetS>
Nov 29 05:59:28 IPFS-node-03 ipfs[419597]: caused by: Head "https://sfo2.digitaloceanspaces.com/ipfs/ipfs/AFYJVZAXXX3EH3KXXX7OFM4BXXXOOSJQY>

```

Except that there are no errors in logs, but I see some frequent memory spikes (VM has 2Gb RAM), and sometimes the server has less than 20Mb of ram according to Zabbix alerts (for like \<5 minutes). Could these crashes be related to memory issues? Or what else might cause them?

---

<div class="post-metadata">

### Author: ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)
#### Post date: [November 29, 2021, 12:49pm UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777/2 "2021-11-29T12:49:22Z")

</div>

Check the system log, if it is a memory issue there should be entries about it causing it to be killed (OOM).

But yes, for 2 Gb RAM you will need to optimize the configuration a bit. Also depends what other things you are running.

---

<div class="post-metadata">

### Author: ![PDVJAM](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@PDVJAM](https://discuss.ipfs.tech/u/PDVJAM)
#### Post date: [November 29, 2021, 12:58pm UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777/3 "2021-11-29T12:58:28Z")

</div>

OK, I have updated VM up to 2CPU/4GB. Keeping eye on the logs…

---

<div class="post-metadata">

### Author: ![PDVJAM](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@PDVJAM](https://discuss.ipfs.tech/u/PDVJAM)
#### Post date: [November 29, 2021, 9:06pm UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777/4 "2021-11-29T21:06:04Z")

</div>

Ok, looks like the amount of RAM was the problem. Now looks good and I don’t see any crashes.

---

<div class="post-metadata">

### Author: ![bneijt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/bneijt/32/5208_2.png) [@bneijt](https://discuss.ipfs.tech/u/bneijt)
#### Post date: [December 1, 2021, 8:17am UTC](https://discuss.ipfs.tech/t/ipfs-server-keeps-crashing/12777/5 "2021-12-01T08:17:06Z")

</div>

I remember looking around in the documentation and finding that using ‘–profile flatfs,server’ as a commandline option helped a lot with RAM. I think flatfs is also now the default and I’m not sure how flatfs and S3 storage backend work together. Hope it helps.
