Jump to content

cron and database backup v6.0.1


keneso

Recommended Posts

Hi,

 

since the upgrade to 6.0.1 it seems the cron job is not working, and database is not emailed.

 

I tried the manual db download, and works fine, the email is correct.

 

As for the cron, I checked cpanel setting, and noticed that it had the admin in the path:

php -q /path/user/public_html/my-custom-admin/cron.php <<< it worked with v5.3.13

whereas the path in setup > automation settings is

php -q /path/user/public_html/crons/cron.php <<< v6.0.1

 

I changed it to the latter, and tomorrow I will see, in the mean time someone could please shed light, or confirm this difference, and help with the db backup?

 

Thank you.

Edited by keneso
Link to comment
Share on other sites

I have the same problem as you, I ran a series of crons testing the configurations that I had previously and the configurations listed in the Automated Settings in v 6.0.1 but I still do not get any email messages like I used to with 5.3.13.

 

After checking the activity logs in (Utilities > Logs > Activity Logs) my crons are running but I saw a post about no "Cron Job: Completed" in the activity log and apparently suggesting the cron is being terminated prematurely by the server and to increase the memory_limit settings in the server's php.ini to 64M or 128MB

 

Here is the URL to that post however it is 4 years old, things might have changed since then

 

http://forum.whmcs.com/showthread.php?37156-WHMCS-Cron-Job-Activity-report-mail-not-send&highlight=cron

 

In the meantime I continue to have the same problem... will update if I ever get it fixed.

Link to comment
Share on other sites

Thank you Cirrus, yes I had come across that post, and some others, before posting I did search quite a bit.

 

No report today either, so the change I made in the path does not work.

 

Hopefully someone will post a solution.

Link to comment
Share on other sites

How large is your database?

http://docs.whmcs.com/Backups

 

Limitations

 

As a DB grows, it becomes too big for a PHP script like the WHMCS cron to handle backing up due to the amount of data within it causing various server limits to be exceeded, usually around the 20MB mark. Unfortunately being big simply means that for a PHP script to loop through and save that data into temporary memory in order to generate a full backup is not possible - either the memory limits or max execution time limits on the server side of things will kick in way before that completes and terminate the script. So the only option at that stage is to look at using an alternative backup means such as WHM automated backups or manual phpMyAdmin exports.

Link to comment
Share on other sites

Thank you both.

 

@Infopro

 

Perhaps I was not clear enough that before posting I did search, and read quite a bit, no, size is not the issue here.

 

@HostworX

 

I have reported that in the opening post, which is different from the v5.3.13 one.

 

Obviously v6 has created some issue in the various settings, as this is not the only thread (yes I've read a couple of others before posting); I wish one of the WHMCS people would try addressing the issue. I did post two different cron script, but none seems to be working, and at this point I wonder which one would be the correct one anyway.

Link to comment
Share on other sites

@ keneso - The email address that the database backups are going to would that be a gmail or google apps account, just wanting to eliminate some possibilities, my backups were going to an email on my own domain which sits in a Google apps account so I use gmail.

Link to comment
Share on other sites

I have run the following cron configs

 

/opt/php53/bin/php-cgi -q /home/user/public_html/custom_admin/cron.php

 

php -q /home/user/public_html/crons/cron.php

 

php -q /home/user/public_html/custom_admin/cron.php

 

and they all seem to work or so say the logs in (Utilities > Logs > Activity Logs) but I still don't get the backup file email.

Link to comment
Share on other sites

  • 4 weeks later...

I have been working with WHMCS support on this after sending the output of a cron debug their prognosis was the following

 

Please see transcript below.....

 

At the end of the output we can see that a fatal error is occurring which is terminating the cron job early:

 

Fatal error: Uncaught exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (SQL: select * from `tblconfiguration` where `setting` = SystemStatsCache limit 1) (SQL: select * from `tblconfiguration` where `setting` = SystemStatsCache limit 1)' in /home/user/public_html/includes/classes/WHMCS/Terminus.php:0

 

This error message indicates that your MySQL server is closing the connection. Please try increasing the timeout values for your MySQL server to keep the connection alive longer and it should resolve your issue.

 

You will need to consult with your web hosting provider or server admin for assistance with this, as it is a server configuration issue.

 

Hope that might help anyone.

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