<?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[Nextcloud Talk CHAT very slow]]></title><description><![CDATA[<p dir="auto">Hello!<br />
We have the problem that Cloudron Nextcloud Talk Chats are very slowly. Entered text is shown 20s-30s later. We use HPF-backend for video, this works well.<br />
I searched Google for that and they say it's a problem with http2 and Apache mpm_prefork. We had to use Apache mpm_event instead (or maybe disable http2). Is there a way to change Apache mode to mpm_event? I just see a Apache config for mpm_prefork where I highered values to this Nextcloud (&gt; 100 user).</p>
<p dir="auto">I don't think it makes sense to do changes on command line if next docker version overwrites all setttings.</p>
<p dir="auto">Bye,<br />
Ingo</p>
]]></description><link>https://forum.cloudron.io/topic/13792/nextcloud-talk-chat-very-slow</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 03:17:57 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/13792.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 May 2025 09:53:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Tue, 17 Jun 2025 20:34:35 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/i.fritz" aria-label="Profile: i.fritz">@<bdi>i.fritz</bdi></a><br />
Thanks for providing these details.</p>
<p dir="auto">Inside you config I can see something shady:</p>
<pre><code>MinSpareServers	20
MaxSpareServers 20
</code></pre>
<p dir="auto">But <code>MaxSpareServers</code> should be <code>MaxSpareServers &gt;= MinSpareServers+1</code> so at least <code>21</code>.<br />
Just in case this could cause any issues.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/i.fritz" aria-label="Profile: i.fritz">@<bdi>i.fritz</bdi></a> said in <a href="/post/108856">Nextcloud Talk CHAT very slow</a>:</p>
<blockquote>
<p dir="auto">I see CPU at a lot of Apache processes</p>
</blockquote>
<p dir="auto">As expected when you start <code>StartServers	50</code> and a minimum of <code>MinSpareServers 20</code> so at least 70 processes.<br />
So maybe this config is already a bit shady.</p>
<h3>&lt;!-- Disclaimer - the following contains partly AI generated content --!&gt;</h3>
<p dir="auto">I've done my due diligance to confirm that everything is correct and sane.<br />
Made the AI format my sloppy text into something readable.</p>
<h3>&lt;!-- End of disclaimer --!&gt;</h3>
<hr />
<p dir="auto">For a Nextcloud setup with 100+ users, the Apache prefork MPM settings should balance performance, stability, and resource efficiency. Below are recommended values based on typical production environments, alongside key considerations:</p>
<hr />
<h3><strong>Recommended Apache Prefork Settings</strong></h3>
<pre><code class="language-apache">&lt;IfModule mpm_prefork_module&gt;
    StartServers             5
    MinSpareServers          5
    MaxSpareServers          10
    MaxRequestWorkers        100   # Previously "MaxClients"
    MaxConnectionsPerChild   5000
&lt;/IfModule&gt;
</code></pre>
<hr />
<h3><strong>Explanation &amp; Rationale</strong></h3>
<ol>
<li>
<p dir="auto"><strong><code>StartServers 5</code></strong></p>
<ul>
<li>Initial processes to handle traffic spikes at startup.</li>
<li><strong>Why?</strong> Avoids delay in spawning processes during sudden load.</li>
</ul>
</li>
<li>
<p dir="auto"><strong><code>MinSpareServers 5</code></strong><br />
<strong><code>MaxSpareServers 10</code></strong></p>
<ul>
<li>Maintains 5–10 idle processes to absorb traffic surges.</li>
<li><strong>Why?</strong> Prevents latency by keeping workers ready. For 100+ users, higher spares reduce wait times during concurrency peaks.</li>
</ul>
</li>
<li>
<p dir="auto"><strong><code>MaxRequestWorkers 100</code></strong></p>
<ul>
<li>Maximum simultaneous requests.</li>
<li><strong>Why?</strong>
<ul>
<li>Assumes <strong>10–20% concurrent active users</strong> (10–20 requests at peak).</li>
<li>Each user may open <strong>2–5 connections</strong> (pages, syncs, uploads).</li>
<li>Adjust based on <strong>RAM</strong>:
<ul>
<li><strong>Estimate RAM/process</strong>:
<ul>
<li>Minimal: 30–50 MB (optimized PHP).</li>
<li>Typical: 70–150 MB (with PHP modules).</li>
</ul>
</li>
<li>Formula:<br />
<code>MaxRequestWorkers = (Available RAM for Apache) / (Average PHP process size)</code></li>
<li>Example: 8 GB RAM server → Reserve 4 GB for Apache → <code>4000 MB / 50 MB ≈ 80 workers</code>.</li>
</ul>
</li>
<li><strong>Start with 100</strong>, monitor, and adjust.</li>
</ul>
</li>
</ul>
</li>
<li>
<p dir="auto"><strong><code>MaxConnectionsPerChild 5000</code></strong></p>
<ul>
<li>Recycle processes after 5000 requests.</li>
<li><strong>Why?</strong> Prevents memory leaks without excessive process recycling.
<ul>
<li>Avoid values &lt;1000 (causes frequent restart overhead).</li>
<li>Values &gt;10k are acceptable if leaks are minimal.</li>
</ul>
</li>
</ul>
</li>
</ol>
<hr />
<h3><strong>Critical Considerations</strong></h3>
<ul>
<li><strong>PHP Memory</strong>:<br />
Set <code>php.ini</code> values:<pre><code class="language-ini">max_execution_time = 300 ; For large uploads/ops
</code></pre>
</li>
</ul>
<p dir="auto">Cloudron sets this for PHP by default:</p>
<pre><code>RUN crudini --set /etc/php/8.3/apache2/php.ini PHP upload_max_filesize 5G &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini PHP post_max_size 5G &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini PHP memory_limit 512M &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.enable 1 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.enable_cli 1 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.interned_strings_buffer 32 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.max_accelerated_files 10000 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.memory_consumption 128 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.save_comments 1 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini opcache opcache.revalidate_freq 1 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini Session session.save_path /run/nextcloud/sessions &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini Session session.gc_probability 1 &amp;&amp; \
    crudini --set /etc/php/8.3/apache2/php.ini Session session.gc_divisor 100
</code></pre>
<hr />
<h3><strong>Adjustment Workflow</strong></h3>
<ol>
<li>Start with recommended values.</li>
<li>Simulate load with tools like <a href="https://httpd.apache.org/docs/2.4/programs/ab.html" target="_blank" rel="noopener noreferrer nofollow ugc"><code>ab</code></a>:<pre><code class="language-bash">ab -n 1000 -c 50 https://your-nextcloud.com/
</code></pre>
</li>
</ol>
<p dir="auto"><strong>Note</strong>: Do not start the load test from your desktop machine at home or the Nextcloud server itself.<br />
It should be a VM with enough power. Maybe rent a bigger Hetzner vServer for 30–60 minutes to do the load test against your Nextcloud.</p>
<ol start="3">
<li>Monitor:
<ul>
<li><strong>RAM usage</strong> (avoid &gt;70% total usage).</li>
<li><strong>Idle workers</strong> (should rarely hit 0).</li>
<li><strong>Queue length</strong> (via <code>mod_status</code>; requests waiting for workers).</li>
</ul>
</li>
<li>Scale incrementally:
<ul>
<li>Increase <code>MaxRequestWorkers</code> if queues form.</li>
<li>Reduce <code>MaxSpareServers</code> if idle processes waste RAM.</li>
</ul>
</li>
</ol>
<p dir="auto">With these setting your Nextcloud should at least be assigned 8GB RAM, but since you have 128 GB why not give it 12GB.<br />
This might already help.</p>
]]></description><link>https://forum.cloudron.io/post/108857</link><guid isPermaLink="true">https://forum.cloudron.io/post/108857</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Tue, 17 Jun 2025 20:34:35 GMT</pubDate></item><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Tue, 17 Jun 2025 20:06:52 GMT]]></title><description><![CDATA[<p dir="auto">It took a while to get a video from customer:<br />
<a href="https://nxt.md-nord.de/s/FWg4S6tGWZFw73X" target="_blank" rel="noopener noreferrer nofollow ugc">https://nxt.md-nord.de/s/FWg4S6tGWZFw73X</a></p>
<p dir="auto">I meanwhile modified Apache mpm prefork settings again. I think last update to v31 changed them back:</p>
<pre><code>&lt;IfModule mpm_prefork_module&gt;
    # On startup, start these many servers
	StartServers	50

    # At any given time, keep atleast these many servers
	MinSpareServers	20

    # At any given time, keep atmost these many idle servers (this is always &gt;= MinSpareServers+1)
	MaxSpareServers 20

    # Maximum number of servers at any given instant. Requests will be queued after this
	MaxRequestWorkers	  200

    # Recycle process after handling these many requests. This protected against accidental memory leaks
	MaxConnectionsPerChild   1000
&lt;/IfModule&gt;
</code></pre>
<p dir="auto">Server has a 16 Core AMD Ryzen 9 5950 CPU, 128 GB RAM and 4 TB NVMe (RAID1). Load is about 2,5-3,0 and I see CPU at a lot of Apache processes.</p>
<p dir="auto">Thank you!<br />
Bye,<br />
Ingo</p>
]]></description><link>https://forum.cloudron.io/post/108856</link><guid isPermaLink="true">https://forum.cloudron.io/post/108856</guid><dc:creator><![CDATA[i.fritz]]></dc:creator><pubDate>Tue, 17 Jun 2025 20:06:52 GMT</pubDate></item><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Mon, 26 May 2025 14:51:40 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/i.fritz" aria-label="Profile: i.fritz">@<bdi>i.fritz</bdi></a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/i.fritz" aria-label="Profile: i.fritz">@<bdi>i.fritz</bdi></a> said in <a href="/post/107241">Nextcloud Talk CHAT very slow</a>:</p>
<blockquote>
<p dir="auto">Entered text is shown 20s-30s later.</p>
</blockquote>
<p dir="auto">Could you go into a little more detail here?<br />
<strong>A</strong>: You write some text, send it and have to wait 20s -&gt; 30s until the message appears in your local chat<br />
<strong>B</strong>: You write some text, send it, the receiver gets the message 20s -&gt; 30s seconds late</p>
<p dir="auto">I could not reliably reproduce this. Also, I don't have access to &gt;100 User Nextcloud for testing more close yto your setup.</p>
<p dir="auto">Maybe a small video of the problem could help to understand it.<br />
If you make one, please have the browser console open so the console logs are viewable.</p>
]]></description><link>https://forum.cloudron.io/post/107717</link><guid isPermaLink="true">https://forum.cloudron.io/post/107717</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 26 May 2025 14:51:40 GMT</pubDate></item><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Mon, 26 May 2025 08:24:14 GMT]]></title><description><![CDATA[<p dir="auto">I will take a look at it.</p>
]]></description><link>https://forum.cloudron.io/post/107684</link><guid isPermaLink="true">https://forum.cloudron.io/post/107684</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 26 May 2025 08:24:14 GMT</pubDate></item><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Tue, 20 May 2025 13:12:41 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/nextcloud/spreed/issues/2211" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/nextcloud/spreed/issues/2211</a></p>
<p dir="auto">http2: "After disabling http2, messaging is possible nearly in real time"</p>
<p dir="auto">nickvergessen2 (Nextcloud Talk developer at Nextcloud GmbH) 08.05.2025:<br />
"It's a misconfiguration on your side, nothing we can fix software side. If you run PHP FPM you need to run the Apache "event" module. FPM + "prefork" will never work"</p>
<p dir="auto">FPM + Apache prefork is exactly, what Cloudron Nextcloud is working. So should be changed to mpm_event.</p>
]]></description><link>https://forum.cloudron.io/post/107423</link><guid isPermaLink="true">https://forum.cloudron.io/post/107423</guid><dc:creator><![CDATA[i.fritz]]></dc:creator><pubDate>Tue, 20 May 2025 13:12:41 GMT</pubDate></item><item><title><![CDATA[Reply to Nextcloud Talk CHAT very slow on Fri, 16 May 2025 13:34:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/i.fritz" aria-label="Profile: i.fritz">@<bdi>i.fritz</bdi></a> said in <a href="/post/107241">Nextcloud Talk CHAT very slow</a>:</p>
<blockquote>
<p dir="auto">I searched Google for that and they say it's a problem with http2 and Apache mpm_prefork</p>
</blockquote>
<p dir="auto">Do you have this link? What could be the problem with http2 and mpm_prefork be? http2 is everywhere by now .</p>
]]></description><link>https://forum.cloudron.io/post/107246</link><guid isPermaLink="true">https://forum.cloudron.io/post/107246</guid><dc:creator><![CDATA[joseph]]></dc:creator><pubDate>Fri, 16 May 2025 13:34:20 GMT</pubDate></item></channel></rss>