I know I'm thick but under Server Settings I'm a bit confused, I have the option to...
Run periodic tasks from system cron: YES or NO
Then it says
When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for bin/phpbbcli.php cron:run to be run by the system cron facility at regular intervals (e.g. every 5 minutes).
So wanting my phpbb forum to look after the CRON automatically...
Is YES Off and NO On or visa versa?
I may have accidentally changed the setting as I'm getting errors on the server that say:
You have reached the limits within the past 24 hours
You have reached the entry processes (the number of simultaneously running php and cgi scripts, as well as cron jobs and shell sessions) limit 8 times.
I've been months trying to get to the bottom of the issue which happens once a day almost at the same time of night. My forum ran flawlessly for months until 7 April and now every 24 hours I get this error. In my various attempts to lighten the server load I may have changed it from YES to NO without realising.
On a shared server, I seem so restricted to investigate what is causing this.
When set to off, phpBB will run the tasks itself. When set to on, it's telling phpBB you'll run the cli script via your system(Operating systems cron) cron instead.
Another difference / advantage is that running the phpBB cron job from the system cron (daemon) is that long-running jobs won't time out. The phpBB cron jobs initiated from a web browser are configured to timeout via max_execution_time in php.ini; it should be set reasonable low to avoid overloading the server with high-cost SQL calls or malicious actors. Since a system cron job is trusted, there's no need to limit its execution time (though you could with set_time_limit() within the php script, just in case).
Ah ok, so the phpBB "cron jobs" run inside of browsers, so they can affect clients or even fail if users join and immediately leave the forum, I guess. And as they need a browser, they won't really run "regularly" on low-frequency sites, so there is no guarantee that they run. So system cron jobs to the jobs server-side instead of client-side and so are much more reliable.
I think I got it now. Please correct me if my assumptions are wrong
mcs wrote: Sat Dec 21, 2024 8:40 pm
Ah ok, so the phpBB "cron jobs" run inside of browsers, so they can affect clients...
There is an image tag at the bottom of the page for the cron task, the user is irrelevant. The browser makes the request for the image, server side it does it's thing. I think the browser gets sent a 1px by 1px transparent .gif. It's an old trick often used in the past because cron jobs were not available with shared hosting plans, they usually are now. phpBB uses it because many users may not be able to set it up correctly or in some cases can't.
For one example phpBB queues emails, if there is giant topic with many participants you aren't sending out hundreds of emails in one shot. If however you have low activity forum on private network they could sit there for a while so you would definitely want to use the system cron to send them out in timely manner.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”