<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[PostgreSQL Service Stuck in a Restart Loop - Health Check Failing]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">My server recently experienced a severe CPU overload. I have resolved the overload, but my PostgreSQL service is now stuck in a constant restart loop, which prevents apps like n8n from starting.</p>
<p dir="auto">I have done troubleshooting and have confirmed the following:</p>
<ul>
<li>docker ps | grep postgres shows the container is permanently in a Restarting state.</li>
<li>A full server reboot, even with all other apps stopped, did not resolve the issue.</li>
<li>The docker logs postgresql command does not show any fatal crash errors. Instead, it shows a repeating loop where the database successfully performs automatic recovery, reports database system is ready to accept connections, and then is terminated a few seconds later.</li>
<li>This suggests the PostgreSQL service is running correctly, but is failing Cloudron's internal health check and being killed.</li>
<li>Because the database is never online for more than a few seconds, apps that depend on it (like n8n) cannot start and fail with a DNS lookup error (getaddrinfo EAI_AGAIN postgresql).</li>
</ul>
<p dir="auto">The core server health is now good (htop is low, disk space is fine), but this PostgreSQL loop is preventing me from using my apps.</p>
<p dir="auto">Could you please advise on how to diagnose the failing health check or how to force the PostgreSQL service into a stable state?</p>
]]></description><link>https://forum.cloudron.io/topic/14402/postgresql-service-stuck-in-a-restart-loop-health-check-failing</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 08:47:05 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/14402.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Oct 2025 20:02:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Wed, 15 Oct 2025 12:05:27 GMT]]></title><description><![CDATA[<p dir="auto">Issue was resolved with <a href="mailto:support@cloudron.io" target="_blank" rel="noopener noreferrer nofollow ugc">support@cloudron.io</a></p>
]]></description><link>https://forum.cloudron.io/post/113828</link><guid isPermaLink="true">https://forum.cloudron.io/post/113828</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Wed, 15 Oct 2025 12:05:27 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Wed, 15 Oct 2025 00:08:34 GMT]]></title><description><![CDATA[<p dir="auto">I was running into a similar issue, and <code>IF NOT EXISTS</code> seemed to be invalid.</p>
<p dir="auto">I followed the instructions <a href="https://forum.cloudron.io/topic/11276/cloudron-update-to-7-7-0-postgresql-does-not-start/2?_=1760486342998">here</a> instead (dropping the database) and am back up and running.</p>
]]></description><link>https://forum.cloudron.io/post/113824</link><guid isPermaLink="true">https://forum.cloudron.io/post/113824</guid><dc:creator><![CDATA[jsit]]></dc:creator><pubDate>Wed, 15 Oct 2025 00:08:34 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 13:17:59 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/obi79" aria-label="Profile: Obi79">@<bdi>Obi79</bdi></a><br />
We have looked into your problem.<br />
Please ensure you have a full backup going forward.<br />
If the following steps are too technical, you can enable remote support and write a mail to <a href="mailto:support@cloudron.io" target="_blank" rel="noopener noreferrer nofollow ugc">support@cloudron.io</a> and we will take care of it.</p>
<ol>
<li>Put the service in recovery mode. <a href="https://docs.cloudron.io/services/#configure" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/services/#configure</a></li>
<li>ssh into the server and run <code>docker exec -ti postgresql /bin/bash</code></li>
<li>edit file <code>/app/code/start.sh</code> lines 106 and 107 to:<pre><code class="language-bash"> psql -Uroot --dbname=postgres -c "CREATE DATABASE IF NOT EXISTS cloudronpgvectorupdate"
 psql -Uroot --dbname=cloudronpgvectorupdate -c "CREATE EXTENSION IF NOT EXISTS vectors"
</code></pre>
</li>
<li>run <code>/app/code/start.sh</code>. This should ideally work and database will be running</li>
<li>if step 4 worked, you can disable the recovery mode</li>
</ol>
]]></description><link>https://forum.cloudron.io/post/113710</link><guid isPermaLink="true">https://forum.cloudron.io/post/113710</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 13 Oct 2025 13:17:59 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 12:32:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> said in <a href="/post/113702">PostgreSQL Service Stuck in a Restart Loop - Health Check Failing</a>:</p>
<blockquote>
<p dir="auto">Since the last 3 lines state:</p>
<pre><code class="language-bash">Oct 13 12:20:45 2025-10-13 10:20:45.712 UTC [15] LOG: database system is ready to accept connections
Oct 13 12:20:45 done
Oct 13 12:20:45 server started
</code></pre>
<p dir="auto">And it still restarts after that? Just to make sure, maybe increase the memory limit even more.</p>
</blockquote>
<p dir="auto">Yes, it starts again over and over. Increasing memory to 4GB did not change anything.</p>
]]></description><link>https://forum.cloudron.io/post/113707</link><guid isPermaLink="true">https://forum.cloudron.io/post/113707</guid><dc:creator><![CDATA[Obi79]]></dc:creator><pubDate>Mon, 13 Oct 2025 12:32:11 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 10:55:43 GMT]]></title><description><![CDATA[<p dir="auto">Since the last 3 lines state:</p>
<pre><code class="language-bash">Oct 13 12:20:45 2025-10-13 10:20:45.712 UTC [15] LOG: database system is ready to accept connections
Oct 13 12:20:45 done
Oct 13 12:20:45 server started
</code></pre>
<p dir="auto">And it still restarts after that? Just to make sure, maybe increase the memory limit even more.</p>
]]></description><link>https://forum.cloudron.io/post/113702</link><guid isPermaLink="true">https://forum.cloudron.io/post/113702</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 13 Oct 2025 10:55:43 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 10:22:47 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your feedback.</p>
<p dir="auto">I have increased the memory to 2GB and rebootet several times. Here's the looping log:</p>
<pre><code>Oct 13 12:19:48 server started
Oct 13 12:19:48 ==&gt; Waiting for Postgres
Oct 13 12:19:48 pg_ctl: server is running (PID: 15)
Oct 13 12:19:48 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main"
Oct 13 12:19:48 ==&gt; Postgres is running
Oct 13 12:19:48 ==&gt; Resetting root password
Oct 13 12:19:48 ALTER ROLE
Oct 13 12:19:48 ==&gt; Upgrading pgvectors
Oct 13 12:19:48 2025-10-13 10:19:48.537 UTC [30] root@postgres ERROR: database "cloudronpgvectorupdate" already exists
Oct 13 12:19:48 2025-10-13 10:19:48.537 UTC [30] root@postgres STATEMENT: CREATE DATABASE cloudronpgvectorupdate
Oct 13 12:19:48 ERROR: database "cloudronpgvectorupdate" already exists
Oct 13 12:20:40 ==&gt; Detected existing installation
Oct 13 12:20:40 ==&gt; Copying updated config
Oct 13 12:20:40 ==&gt; Updating existing postgresql
Oct 13 12:20:40 waiting for server to start....2025-10-13 10:20:40.763 UTC [15] LOG: starting PostgreSQL 16.8 (Ubuntu 16.8-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, 64-bit
Oct 13 12:20:40 2025-10-13 10:20:40.765 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432
Oct 13 12:20:40 2025-10-13 10:20:40.766 UTC [15] LOG: listening on IPv6 address "::", port 5432
Oct 13 12:20:40 2025-10-13 10:20:40.777 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Oct 13 12:20:40 2025-10-13 10:20:40.813 UTC [18] LOG: database system was interrupted; last known up at 2025-10-13 10:19:48 UTC
Oct 13 12:20:45 ....2025-10-13 10:20:45.582 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress
Oct 13 12:20:45 2025-10-13 10:20:45.599 UTC [18] LOG: redo starts at 6/546D6180
Oct 13 12:20:45 2025-10-13 10:20:45.599 UTC [18] LOG: invalid record length at 6/546D7CF8: expected at least 24, got 0
Oct 13 12:20:45 2025-10-13 10:20:45.599 UTC [18] LOG: redo done at 6/546D7CA0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
Oct 13 12:20:45 2025-10-13 10:20:45.640 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait
Oct 13 12:20:45 .2025-10-13 10:20:45.682 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.010 s, sync=0.006 s, total=0.047 s; sync files=4, longest=0.003 s, average=0.002 s; distance=6 kB, estimate=6 kB; lsn=6/546D7CF8, redo lsn=6/546D7CF8
Oct 13 12:20:45 2025-10-13 10:20:45.712 UTC [15] LOG: database system is ready to accept connections
Oct 13 12:20:45 done
Oct 13 12:20:45 server started```</code></pre>
]]></description><link>https://forum.cloudron.io/post/113699</link><guid isPermaLink="true">https://forum.cloudron.io/post/113699</guid><dc:creator><![CDATA[Obi79]]></dc:creator><pubDate>Mon, 13 Oct 2025 10:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 09:45:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/obi79" aria-label="Profile: Obi79">@<bdi>Obi79</bdi></a></p>
<p dir="auto">Can you please try to give the PostgreSQL service more memory in the Cloudron Dashboard?<br />
This might already fix it.</p>
<hr />
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a> said in <a href="/post/113692">PostgreSQL Service Stuck in a Restart Loop - Health Check Failing</a>:</p>
<blockquote>
<p dir="auto">Have you rebooted the server yet?</p>
</blockquote>
<p dir="auto">Maybe the topic was edited after you wrote your message, since <a class="plugin-mentions-user plugin-mentions-a" href="/user/obi79" aria-label="Profile: Obi79">@<bdi>Obi79</bdi></a> stated:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/obi79" aria-label="Profile: Obi79">@<bdi>Obi79</bdi></a> said in <a href="/post/113689">PostgreSQL Service Stuck in a Restart Loop - Health Check Failing</a>:</p>
<blockquote>
<p dir="auto">A full server reboot, even with all other apps stopped, did not resolve the issue.</p>
</blockquote>
]]></description><link>https://forum.cloudron.io/post/113693</link><guid isPermaLink="true">https://forum.cloudron.io/post/113693</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 13 Oct 2025 09:45:49 GMT</pubDate></item><item><title><![CDATA[Reply to PostgreSQL Service Stuck in a Restart Loop - Health Check Failing on Mon, 13 Oct 2025 09:42:48 GMT]]></title><description><![CDATA[<p dir="auto">Have you rebooted the server yet?</p>
]]></description><link>https://forum.cloudron.io/post/113692</link><guid isPermaLink="true">https://forum.cloudron.io/post/113692</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Mon, 13 Oct 2025 09:42:48 GMT</pubDate></item></channel></rss>