CRON hangs out

CRON hangs out

by Juan Fortuna -
Number of replies: 8

Hi to everybody! I need some help. My problem is with my moodle 3.6.2 is when i ran https://mymoodle/admin/cron.php and it hangs out on:

Server Time: Thu, 15 Oct 2020 14:55:12 -0300


Execute adhoc task: tool_dataprivacy\task\process_data_request_task
... started 14:55:12. Current memory use 4.8MB.
Warning: No purpose is defined at the system level. Deletion will delete all.
Pre-processing request...
  Fetching data from 583 components (Thursday, 15 de October de 2020, 14:55)
    Processing antivirus_clamav (1/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_completion (2/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_coursecompleted (3/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_date (4/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_grade (5/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_group (6/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_grouping (7/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_mobileapp (8/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_profile (9/583) (Thursday, 15 de October de 2020, 14:55)
    Processing availability_xp (10/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_calculated (11/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_calculatedmulti (12/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_calculatedsimple (13/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_ddimageortext (14/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_ddmarker (15/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_ddwtos (16/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_description (17/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_essay (18/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_gapselect (19/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_match (20/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_missingtype (21/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_multianswer (22/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_multichoice (23/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_numerical (24/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_random (25/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_randomsamatch (26/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_shortanswer (27/583) (Thursday, 15 de October de 2020, 14:55)
    Processing qtype_truefalse (28/583) (Thursday, 15 de October de 2020, 14:55)
    Processing mod_accredible (29/583) (Thursday, 15 de October de 2020, 14:55)
    Processing mod_assign (30/583) (Thursday, 15 de October de 2020, 14:55)
Some time ago I had some problems running cron on my server and after I resolve it I ran this script from web and this happend to me.

My database is PostgreSQL.

Thank you for any help ando sorry for my english, but I'm not a native speaker.

John

Average of ratings: -
In reply to Juan Fortuna

Re: CRON hangs out

by Ken Task -
Picture of Particularly helpful Moodlers

Cron should probably be run from operating system as a cron job using moodlecode/admin/cli/cron.php ... the 'cli' means command line.

That takes apache/web service out of the loop and avoids php settings/apache settings to run what could be a long time and pretty intensive.

Please see: https://docs.moodle.org/39/en/Cron

'SoS', Ken

In reply to Juan Fortuna

Re: CRON hangs out

by Dr. Nellie Deutsch -
Yes, tool_dataprivacy\task\process_data_request_task always seems to get stuck and cause a bottleneck. Forums stop sending notifications. I keep deleting it. I hope Im not messing up, but it works.
In reply to Dr. Nellie Deutsch

Re: CRON hangs out

by Gordon Mills -
Yes we have the same Issue every week we approve the data requests and run the cron it happens. Unusual this has only started since upgrading to Moodle 3.10.2+ (Build: 20210319)
In reply to Dr. Nellie Deutsch

Re: CRON hangs out

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Nellie and Gordon,

If this task is causing the cron to hang... have you checked whether you set up the data registry correctly? This can be found in Site admin > Users > Privacy > Data registry (yourmoodleurl.com/admin/tool/dataprivacy/dataregistry.php). The GDPR compliance bit needs to be completely set up for all features to work... it may block your cron in some or other way.
In reply to Joost Elshoff

Re: CRON hangs out

by Dr. Nellie Deutsch -
Thank you for responding to Gordon and I, Joost. The cron works for email messages ad so on but the forums. I checked the data registry as you suggested and it was not set (default). I set it to inherit. As to the bottleneck and the discussion forums. Every time they get stuck, I help along by deleting \tool_dataprivacy\task\process_data_request_task line from phpMyAdmin under task_adhoc. \tool_dataprivacy\task\process_data_request_task kept appearing on a daily basis, sometimes a few times a day for about a few weeks, then it stopped. I'm home free now.
In reply to Joost Elshoff

Re: CRON hangs out

by Gordon Mills -

Yes all is setup correctly in the data registry, everything worked fine until about 3 weeks ago when we installed an update.