Closed supermayx closed 2 years ago
Can you add the trilium log? It should be in the directory binded to the Docker container.
Thanks. Log file is here: trilium-2022-03-29.log
I checked the log, found that trilium will do a database optimization operation every hour, and all the die events happened right after it.
And more interestingly, after I reported this bug, it has been alive for straight 12 hours without any issue. LOL I didn't do anything other than added a TZ ENV, trying to change the log timestamp inside container (and found out it's not working), maybe that's the cure? (-_-!)
It looks like each database optimization completed successfully and the consistency checks passed as well. If it hasn't happened again since you restarted it, I'd bet it was a sporadic problem with the database optimization, but your database still seems okay.
Did you try explicitly stopping the container and restarting it (before it fixed itself)? The automatic restarting of the container might have been a different process than manually doing it while you changed the environment variable, thus triggering an actual reboot and fixing it.
Acturally I've tried every kind of restart method at the beginning, unplug and replug the power cord, manual restart in Portainer, redeploy the container, but only the last time it stopped dying. Now it's been working for a whole day, hope it will hang on in the future, if it dies again I will tell you. Thanks!
Trilium Version
0.50.2
What operating system are you using?
Other (specify below)
What is your setup?
Local + server sync
Operating System Version
OpenWrt docker
Description
I am using a Amlogic S905D box running openwrt, it has 4-core A53 CPU, 2G RAM, 8G ROM, and have been running trilium docker for about half a year with no issue.
AArch64 Processor : Cortex-A53 * 4 OpenWrt R22.1.1 / LuCI Master (git-21.335.48743-5f363d9) 5.4.170-flippy-68+o
I noticed the server crashes now and then recently, in Portainer the crash log says "Exit code 137", seems due to memory issue.
And I checked the container memory and CPU consume, at the begining, everything is fine, but after about an hour, it will go up and up until the whole system crash. (add screenshot later) (The last timetag of CPU chart is wrong, don't know why)
I set the RAM limit(768MB) for the container, now the system won't crash, but trilium container still do. Then I set it to "restart always", it still usable as a sync server. My database is quite small, only 187MB.
In openwrt docker log, we can see the container dies once an hour.
[2022-03-29 00:16:54] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 00:16:55] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 01:17:56] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 01:17:57] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 01:17:57] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 01:17:57] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 01:17:58] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 02:18:59] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 02:19:00] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 02:19:00] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 02:19:00] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 02:19:01] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 03:20:01] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 03:20:02] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 03:20:02] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 03:20:02] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 03:20:03] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 04:21:03] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 04:21:04] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 04:21:04] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 04:21:04] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 04:21:06] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 05:22:06] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 05:22:07] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 05:22:07] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 05:22:07] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 05:22:08] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 06:23:09] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 06:23:09] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 06:23:10] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 06:23:10] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 06:23:11] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 07:24:11] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 07:24:12] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 07:24:12] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 07:24:12] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 07:24:13] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 08:25:10] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 08:25:11] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 08:25:11] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 08:25:11] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 08:25:12] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium ....... [2022-03-29 09:25:55] container top Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:00] container top Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:05] container top Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:09] container oom Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:10] container die Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:10] network disconnect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 09:26:10] network connect Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Network Name: bridge Network type: bridge [2022-03-29 09:26:11] container start Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium [2022-03-29 09:26:11] container top Container ID: c924744b0a1d8a4e7fd1debd830e62375c10220b47c9e0e6838568533187b800 Container Name: trilium