Kirby is checking the lock status of a page every 10 seconds. This is fine. When I change something on the page and the page gets “locked”, everything still is fine. Every 10 seconds the lock status of the page gets requested and is 200 OK.
This is where it gets tricky:
After a while, changes still pending, the requests for the lock are running into timeouts…
This is not a new installation. This Kirby 3.9 got upgraded from Kirby 3.5.3
I try to provide more information. I have to make some changes to PHP Log Level. Also I’ll go check any firewall rules. But after some further testing this lock issue only occurs after working in the panel (make some changes, don’t save them, change tab without saving, come back etc.). While idling and not having any pending changes, Kirby can request lock hundred times without any issues.
Just checked the rules. There is no firewall rule which could intervene here. We also use traefik as Ingress Controller and there is also no rule or circuit breaker which could intervene here.
Made a change
Left it pending (not saving)
After rechecking now, I got a rule in our traefik ingress which will kill requests taking longer than 45 seconds. The question now is, why does Kirby take so long for an answer? I can’t remove the rule… 45 seconds are already a long timespan. It would flood all connections with Kirby lock requests.
Thanks for the additional information. It suggests that the call to flock() blocks because another thread/PHP worker tries to access the lock file at the same time. We haven’t seen this behavior of timed-out requests before, but I can try to help you debugging it.
What I find interesting is that it only happens once the user tabs out of the Panel. A few questions:
Are there multiple users in your Kirby installation?
When tabbing out, was the other tab unrelated to the Kirby installation?
Does it also occur in different browsers?
Does it also occur when using a fresh Starterkit installation on the same server setup?