Jump to content

Cron Errors since 4.5.1 Upgrade


mikelegg

Recommended Posts

I've started receiving errors on the daily WHMCS cron job since upgrading to 4.5.1.

 

Some days I get ...

 

Fatal error: Cannot redeclare cpanel_configoptions() in /[path-to-folder]/public_html/modules/servers/cpanel/cpanel.php on line 0

 

Other days I get ...

 

Fatal error: Cannot redeclare plesk_configoptions() in [path-to-folder]]/public_html/modules/servers/plesk/plesk.php on line 0

 

Is anybody else experiencing this?

Link to comment
Share on other sites

Not getting Cron errors, but since the upgrade the cron has not been running properly.

 

The cron runs at 3am and will process pending payments and create pending invoices, but does not send me the email or send the back up as usual.

Link to comment
Share on other sites

I upgraded yesterday and up until then, no problems with the cron job.

Today at 03:00 the database backup ran fine, and so did exchange rate syncs and an additional cron job function to round exchange rates.

However I also had this error: "CURL Error: 7 - couldn't connect to host" against all the domains in my WHMCS ResellerClub Domain Syncronisation Report.

Also, I got a Cron Daemon email with this content (sorry, its a bit long):

 

mod_cahconfig<br />mod_ipmanager<br />mod_ipmonitor<br />mod_jwhmcs_config<br />tblaccounts<br />tblactivitylog<br />tbladdonmodules<br />tbladdons<br />tbladminlog<br />tbladminperms<br />tbladminroles<br />tbladmins<br />tbladminsecurityquestions<br />tblaffiliates<br />tblaffiliatesaccounts<br />tblaffiliateshistory<br />tblaffiliatespending<br />tblaffiliateswithdrawals<br />tblannouncements<br />tblbannedemails<br />tblbannedips<br />tblbillableitems<br />tblbrowserlinks<br />tblcalendar<br />tblcancelrequests<br />tblclientgroups<br />tblclients<br />tblclientsfiles<br />tblconfiguration<br />tblcontacts<br />tblcredit<br />tblcurrencies<br />tblcustomfields<br />tblcustomfieldsvalues<br />tbldomainpricing<br />tbldomains<br />tbldomainsadditionalfields<br />tbldownloadcats<br />tbldownloads<br />tblemails<br />tblemailtemplates<br />tblfraud<br />tblgatewaylog<br />tblhosting<br />tblhostingaddons<br />tblhostingconfigoptions<br />tblinvoiceitems<br />tblinvoices<br />tblknowledgebase<br />tblknowledgebasecats<br />tblknowledgebaselinks<br />tbllinks<br />tblnetworkissues<br />tblnotes<br />tblorders<br />tblpaymentgateways<br />tblpricing<br />tblproductconfiggroups<br />tblproductconfiglinks<br />tblproductconfigoptions<br />tblproductconfigoptionssub<br />tblproductgroups<br />tblproducts<br />tblpromotions<br />tblquoteitems<br />tblquotes<br />tblregistrars<br />tblservergroups<br />tblservergroupsrel<br />tblservers<br />tblsslorders<br />tbltax<br />tblticketbreaklines<br />tblticketdepartments<br />tblticketescalations<br />tblticketlog<br />tblticketmaillog<br />tblticketnotes<br />tblticketpredefinedcats<br />tblticketpredefinedreplies<br />tblticketreplies<br />tbltickets<br />tblticketspamfilters<br />tblticketstatuses<br />tbltodolist<br />tblupgrades<br />tblwhoislog<br />

Link to comment
Share on other sites

Not getting Cron errors, but since the upgrade the cron has not been running properly.

 

The cron runs at 3am and will process pending payments and create pending invoices, but does not send me the email or send the back up as usual.

 

We've been having the same issue.

 

To fix it I first tried running the Cron job from the command line to see if I can find any errors, but it actually completed successfully.

 

So after that I set it to run at a different time and it worked for a day, and then this morning it's back to stopping part of the way through. If you look in the activity log and do a search for "Cron" you can see where it stopped, although it doesn't really give any useful info as it seems to stop at a different task each day.

Link to comment
Share on other sites

I've been having this same issue. I'm not using database backup.

 

Matt suggested it's because I didn't get all the files updated to 4.5.1, but I've double checked and re-uploaded everything,making sure everything was uploaded binary, and I'm still having the problem.

Link to comment
Share on other sites

Same problem here, since upgrading to 4.5.1 (on IIS) the cron backups did not run normal anymore. When running the cron on a command line or just via http, the script is settings the CPU usage to 100% for many hours till we kill the php process manually… So we disable the backup (we have normal MySQL backups, so that’s not a problem), run cron via the command line, and everything look fine, the cron gives no errors and we get a normal “WHMCS Cron Job Activity” e-mail like we always get.

 

We thought that it was working ok, but it is not. The “WHMCS Cron Job Activity” email say all the time “0 Invoices Created”. That not true, because on the first of every month WHMCS should generate allot of invoices and now it skips all the “recurring billable items” (our customers are paying per month).

 

To test I added a new recurring payment, but this is also not working. Only when I add a “Invoice on Next Cron Run” invoice action, it works perfectly. So we are shure that the cron itself is running fine but skips the daily, weekly and monthly recurring items.

 

What can we do to fix this? Please help.

Link to comment
Share on other sites

Set your cron email output to null, or add the following to the cron command:

 

>/dev/null

 

No a good idea because this bug is preventing the cron from completing. The gathering of disk storage and bandwidth statistics in not happening, for example. This is very bad for those of us who are charging for overage. Suppressing the cron output is not the solution.

Link to comment
Share on other sites

We've had two successful runs now by splitting the cron into two parts and running the second part 30 minutes later. Here's how it looks:

 

0 5 * * * /home/user/whmcs_cron.sh
30 5 * * * /home/user/whmcs_usage.sh

 

whmcs_cron.sh contains

/usr/local/bin/php -q -d memory_limit=128M /home/user/public_html/admin/cron.php skip_usagestats

 

whmcs_usage.sh contains

/usr/local/bin/php -q -d memory_limit=128M /home/user/public_html/damin/cron.php skip_invoices skip_latefees skip_ccprocessing skip_invoicereminders skip_domainrenewalnotices skip_suspensions skip_terminations skip_cancelrequests skip_closetickets skip_affreports skip_ccexpirynotices skip_backups

 

it was failing on the usage stats for us too but this works so far.

Link to comment
Share on other sites

  • WHMCS CEO
No a good idea because this bug is preventing the cron from completing. The gathering of disk storage and bandwidth statistics in not happening, for example. This is very bad for those of us who are charging for overage. Suppressing the cron output is not the solution.

 

You are not experiencing the same issue as the user is reporting above if your cron is actually ending early. The backup stage is the last thing in the cron, so that if problems occur it doesn't affect anything, so if you're getting the output confirming what tables have been backed up then all activity the cron has to do has been completed successfully. Therefore surpressing the email confirmation is something you can do without any problems. If however you're experiencing a more serious issue then you should open a ticket. Time execution & memory limits are the most common causes of cron early termination though.

 

Matt

Link to comment
Share on other sites

[quote=Matt;189426Time execution & memory limits are the most common causes of cron early termination though.

 

Matt

 

Would you be able to offer some suggestions on how best to tackle this then? It would appear from the number of recent posts a few people are experiencing issues running the cron to completion since the upgrade.

Link to comment
Share on other sites

Damo -- does your WHMCS seem to be running slower then usually, as if the Cron is stuck, as indicated by other users?

Yes, this needs to be corrected because we can not go back and restore the old version since there is now new data, can not go back to the old database now.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated