Problems with cron and nonzero cron_lock

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
stevenospam
Registered User
Posts: 84
Joined: Thu Dec 15, 2011 2:02 am

Problems with cron and nonzero cron_lock

Post by stevenospam »

Support Request Template
What version of phpBB are you using? phpBB 3.3.3
What is your board's URL? http://forum.altosdecerroazulresidencial.org
Who do you host your board with? Lonex
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What extensions do you have installed? Digests
What styles do you currently have installed? prosilver
What language(s) is your board currently using? english & spanish
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? I downloaded the install package and used it to update my existing 3.0 phpbb installation. There were no problems with the update process.
Please describe your problem. PHPBB crons are not running as far as I can tell. I installed the current Digests extension without problem. It upgraded the database as part of the install. I have a system cron that runs hourly to start the phpbb cron process. Digests are not being sent. After a lot of investigating and working with the Digests author, I deactivated all the extensions, including Digests. After the system cron runs, the SQL cron_lock element of config_name has a non zero value. If I change the cron_lock to 0 and run the system cron job, cron_lock changes to a nonzero value and stays that way. For example it's currently 1620072012 8xt0ttnbrisxysjt. The system cron job being run is:
curl --silent https://forum.altosdecerroazulresidenci ... .cron_task
I am leaving Digests deactivated until phpbb crons are working correctly.
There are no indications in the admin logs that there are any problems. By the way I'm somewhere in between new to PHP & PHPBB and comfortable.
Generated by SRT Generator
stevenospam
Registered User
Posts: 84
Joined: Thu Dec 15, 2011 2:02 am

Re: Problems with cron and nonzero cron_lock

Post by stevenospam »

Continuing to work on this, I found a great thread at:
viewtopic.php?t=2544871
./bin/phpbbcli.php cron:list
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl(/usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl: cannot open shared object file: No such file or directory), /usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl.so (/usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Tarea preparada:
================

* cron.task.core.prune_all_forums
* cron.task.core.tidy_warnings
* cron.task.text_reparser.poll_option
* cron.task.text_reparser.poll_title
* cron.task.text_reparser.post_text
* cron.task.text_reparser.user_signature

Tarea no preparada:
===================

* cron.task.core.prune_forum
* cron.task.core.prune_shadow_topics
* cron.task.core.prune_notifications
* cron.task.core.queue
* cron.task.core.tidy_cache
* cron.task.core.tidy_database
* cron.task.core.tidy_plupload
* cron.task.core.tidy_search
* cron.task.core.tidy_sessions
* cron.task.text_reparser.pm_text
* cron.task.core.update_hashes

The result of running cron manually is:
./bin/phpbbcli.php cron:run -vvv
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl(/usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl: cannot open shared object file: No such file or directory), /usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl.so (/usr/local/php7.4/lib/php/extensions/no-debug-non-zts-20190902/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Ejecutando tarea: cron.task.core.prune_all_forums.
Ejecutando tarea: cron.task.core.prune_notifications.
Ejecutando tarea: cron.task.core.tidy_cache.
Ejecutando tarea: cron.task.core.tidy_database.
Ejecutando tarea: cron.task.core.tidy_plupload.
Ejecutando tarea: cron.task.core.tidy_search.
Ejecutando tarea: cron.task.core.tidy_sessions.
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6399680 bytes) in /home/www/forum.altosdecerroazulresidencial.org/phpbb3/phpbb/db/driver/driver.php on line 599

I'm not sure what to do to correct the fatal error.
stevenospam
Registered User
Posts: 84
Joined: Thu Dec 15, 2011 2:02 am

SOLVED Re: Problems with cron and nonzero cron_lock

Post by stevenospam »

This is fixed. I had to increase the PHP maximum memory from 128M to 256M.
I wish that PHP's cron would write an error message in the admin log.
stevenospam
Registered User
Posts: 84
Joined: Thu Dec 15, 2011 2:02 am

Re: Problems with cron and nonzero cron_lock

Post by stevenospam »

Now I can run cron from an SSH prompt but it fails when run from a system cron.
./bin/phpbbcli.php cron:run -vvv output is below and cron_lock is 0 after it completes
Ejecutando tarea: cron.task.core.prune_all_forums.
Ejecutando tarea: cron.task.text_reparser.poll_title.
Ejecutando tarea: cron.task.text_reparser.post_text.
Ejecutando tarea: cron.task.text_reparser.user_signature.
Ejecutando tarea: phpbbservices.digests.cron.task.cron_task.

The system cron syntax is:
curl --silent -k https://forum.altosdecerroazulresidenci ... .cron_task

some cron task is apparently failing because the cron_lock gets set to something like 1620072012 8xt0ttnbrisxysjt and stays that way.

If I set cron_lock to 0 and run curl --output -k https://forum.altosdecerroazulresidenci ... .cron_task
The output is below and cron_lock is not 0 like above
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 43 100 43 0 0 39 0 0:00:01 0:00:01 --:--:-- 39

I need help to figure out what is failing when the curl system cron job runs.
Post Reply

Return to “[3.3.x] Support Forum”