Jump to content

database connection fails after daily cron rus


Recommended Posts

Once daily cron runs, we get a "Critical Error Could not connect to the database" error. It lasts for about 2 minutes.

 

I have turned off backups and checked the activity log. The issue persists and there is nothing in the activity log that is helpful.

 

I suspect I need to increase some setting in MySQL but not sure what.

 

-Allan

Link to comment
Share on other sites

Activating error log and I this:

 

[16-Jun-2017 14:01:53 UTC] [WHMCS Application] ERROR: PDOException: SQLSTATE[HY000] [2002] No such file or directory in /home/knighua7/public_html/clients/vendor/illuminate/database/Connectors/Connector.php:55 Stack trace: #0 etc.

 

Connector.php does exit in the directory referred to in the error.

Edited by aknight
Link to comment
Share on other sites

Allan,

 

you might want to edit the above post - I think it might show your database username and password! :?:

 

is the cron completing or is it being interrupted at some stage?

for something like this, it might be worth opening a ticket with support and letting them take a look... and perhaps update the thread if/you they resolve it.

Link to comment
Share on other sites

Hi,

 

please remove your database login from the error log.

 

According to results in google, where people had the same problem [1] [2], it helped when changing the database host to 127.0.0.1 instead of localhost.

If it does not help (what i believe), it could be that there is a problem with your database server. Did you checked your MySQL server logs? Maybe it is losing connection.

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