cron.php issue

cron.php issue

by Paul Martin -
Number of replies: 7

Hi,

Just upgraded to Moodle 3.5.1 and from php5 to 7.   Running on Debian 8.  The upgraded completed successfully without error. However,  the cron.php job is taking a very long time to complete (still running since upgrade).  The debug log shows the following:


Convert 1 submission attempt(s) for assignment 4756

Convert 1 submission attempt(s) for assignment 4756

Convert 1 submission attempt(s) for assignment 4750

Convert 1 submission attempt(s) for assignment 4756

Convert 1 submission attempt(s) for assignment 4756


... and so on.


Any idea what is going on here?  I have the feeling that something that did not work in a previous version has started working since the upgrade and is dealing with a large backlog.





Average of ratings: -
In reply to Paul Martin

Re: cron.php issue

by Ken Task -
Picture of Particularly helpful Moodlers

Think you are correct ... depending upon what version of Moodle you upgraded from.

In 3.5.1 go to Site Admin and search for 'convert'.

Check out Manage Document Converters and Unoconv.  Cron is attempting to prepare all the assignment submissons for grading probably with Unoconv.

Think many have switched from unoconv to using Google.

So your cron is working and doing what it's been told to do from previous version settings.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: cron.php issue

by Paul Martin -

Thanks Ken,

Both Google and Unoconv are disabled, so I don't know why the cron.php is trying to convert.  It's been running for hours and delaying other tasks like mail notification from moodle.  

server admin




In reply to Paul Martin

Re: cron.php issue

by Ken Task -
Picture of Particularly helpful Moodlers

Hinted at earler ...  from what version of Moodle did you upgrade .. so I'll ask ... you went from what version of moodle to 3.5.1?

Did you have any addon for annotating uploaded assignments/docs? (they existed for 3.1.x of Moodle).  If you did, and that if that plugin is still functioning, you might consider letting cron run it's course cause I cannot predict what will happen if one kills the cron job at this point.

As long as cron appears to be progressing in converting ... it's not reporting errors, just what it's doing ... then let it run.

Obviously, however, if cron is a zombie and a process out of control ... plus not really working, then one doesn't really have an option to let it run ... kill it.

Cron job now consist of task.

Check your task list for a 'conversion' task of some sort.   Disable it for now.

Kill the cron job ... ps aux |grep php should show the job running it now.   Then kill -9 [processid].

Once having done that, go back to the site and look at converters again.   Unoconv would require the installation of unoconv (a python script) and the install of LibreOffice for local conversions, plus a listener (cause it's not a service).  Do you re-call having done that before your upgrade?

Again, think I'd opt for Google Conversions ... if you didn't have that setup before, place to start might be:

https://docs.moodle.org/35/en/Document_converters

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: cron.php issue

by Paul Martin -

Hi Ken, 


I upgraded from 3.4. 

I was not involved in the initial install of this Moodle server so not sure about addons for annotating uploaded assignments/docs.  I don't see any evidence of such but I'll keep looking and update this post with any findings. 

The cron.php job finally finished and subsequent jobs have returned to normal execution time. 

Thanks again for your time and help with this --  Very much Appreciated!

Paul
In reply to Paul Martin

Re: cron.php issue

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome.   Ahhhh .... yeah, not being the person who installed and admin'd before puts one into a discovery mode if there were no server notes left for others to follow in admin of server.

Suggest watching today ... and investigating if changing things to what 3.5.x does natively might be a better approach now and in moving forward. smile

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Paul Martin

Re: cron.php issue

by Ken Task -
Picture of Particularly helpful Moodlers

A follow up ... 'added value'?

Have recently had to migrate a server and even though I normally have everything mapped out and things go smoothly, this time had  forgotten the little 'tweakie' things ... one of them cron.

So in that light ...

http://sos.sosoftexas.org/blog/index.php/2018/08/26/a-better-way-of-running-moodle-cron/

And do feel free to rate any posting in this thread as 'useful' ... helps me keep my badge! smile

'spirit of sharing', Ken


Average of ratings: Useful (2)
In reply to Ken Task

Re: cron.php issue

by Paul Martin -

cheers Ken,  I'll take a look.

I've rated all your postings here as  'useful'  now.


paul