ich bin eben von Host Europe zu Hetzner gewechselt, da Host Europe das Mailsystem auf Microsoft 365 umstellt. Ich habe ein ähnliches Hosting-Paket wie mein damaliges bei Host Europe - das Level 9.
Leider zeigt mir jetzt meine Nextcloud-Installation in den Verwaltungseinstellungen, dass ich zu wenig memory_limit (PHP-Speichergrenze) habe. Es soll ja 512MB sein.
Leider ist mit meinem Paket nur 384MB möglich. Das größere Paket ist mir schlichtweg zu teuer.
Außerdem gibt es noch einen Hinweis:
Der "Strict-Transport-Security“-HTTP-Header ist nicht auf mindestens "15552000“ Sekunden eingestellt. Für mehr Sicherheit wird das Aktivieren von HSTS empfohlen, wie es in den Sicherheitshinweisen erläutert ist.
Was kann denn genau passieren, da die Speichergrenze zu gering ist?
Ich habe jetzt natürlich Angst ein Update von Nextcloud zu machen.
This is applied to each PHP process separately and the rule of good conduct in PHP is to have it as low as possible unless your scripts request more. So if you were OK with 512MB, you may be good with 384MB, unless you have errors about running out of memory for certain scripts.
In this case you can override this manually by adding ini_set('memory_limit', '512M'); to the top of the offending script.
If you can not set it in your web server configuration, work your way through .htaccess of your main Nextcloud directory and add:
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
</IfModule>
If you already have the <IfModule mod_headers.c> directive, just add the Header set line below it.
This will be replaced with the default .htaccess once you upgrade, so keep a backup copy of your enhanced .htaccess file and replace it after an upgrade.
Just about what any PHP script would do - try hard to fit, become much slower in the process. If the limit is low enough, it will timeout and fail with a complaint written to the logs. The main UI should not be affected (after all, it runs in a different 384M space).
I don’t really know which of the zillion PHP scripts that are included in Nextcloud really needs whole 512M, I would assume a massive influx of simultaneous DB transactions can saturate this limit but can’t really say how this is handled in NC, perhaps each transaction has it’s own process?
On the other hand, if I was a developer, I would override the limit within the crucial scripts with a limit override I mentioned earlier. But I do not develop NC and I don’t know if such an override is considered good taste in PHP programming.
I only use NC on my private servers for production so I got virtually no RAM limits and can set this variable to whatever I fancy, however I ran an experiment on a tightly limited account at a hosting provider with 256M limit for the scripts. It was dead slow, but it worked and the only timeouts I got were from the lack of redis cache on this account and not PHP memory limit.