"Error loading page" only while cron.php is executed

Dear Fellows,

Nextcloud is running great, except one little problem I don’t manage to solve.
It’s Apache2 with PHP 7.4 in a Turnkey-Container on Proxmox.
cron.php is run as a cronjob every five minutes.
And while cron.php is executed (and only then), I get miscellaneous errors navigating the web interface, most often “problems loading page” (“Fehler beim Laden der Seite”).
The server is running great and I really can’t seem to find any suspicious logs.
System check approves with that green checkmark and the page loading error with the five seconds countdown (or, e.g. a location error while loading weather info on dash board) only occurs exactly while cron.php is executed.
The problem is basically that this happens every five minutes.
Can anybody give me a clue?
I’d be grateful for help.
I suspect a php.ini setting, but can’t spot it.

Kind regards,


I’m going to test it during the next weeks, but the remedy seems to be to uncomment
in php.ini
I really don’t know why I set this any more, but the server runs for a year now and had me fiddling around a little.

Kind regards!

I finally managed to find the solution.
It has nothing to do with caching and acceleration, but with PHP’s garbage collection.
I had session.gc_probability = 1 in my php.ini because another appliance on the server had it among their best practices.
When I set session.gc_probability = 0 the problem disappeared.
I must admit that I have a poor understanding of this garbage collection mechanism because I thought that my settings meant that I get a 1/100 one percent chance that garbage collection for sessions was triggered at any given request and then only deletes anything older than 14400 seconds (but the error showed up much more often in terms of a few minutes).
So, I just put a PHP admin flag with the inital setting in that website conf file for the other appliance and nextcloud is running perfectly.
Hope this helps someone because I saw the issue mentionned quite often.

Kind regards and some nice moments within and without your cloud.