Gav Posted August 1, 2010 Share Posted August 1, 2010 Over the last day, I've had this error coming up: Critical Error Could not connect to the database I'd love to give more info but that's all it says - is there any way of getting more info on exactly what the problem is? I know that there's nothing wrong with the database because I use my own scripts to get data from the WHMCS database, using the same mysql login (I use it to display due invoices in the user control panel). When I restart the mysql service, it starts working again. This has got me slightly confused, why would WHMCS not be able to connect to the DB when I can connect fine with other scripts? And is there anything I can do to get a more useful error message when it happens again? Thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCSModuleNetworks Posted August 2, 2010 Share Posted August 2, 2010 @Gav This is not WHMCS script issues nor WHMCS staff can solve this as its not related to WHMCS. The issue is with your Database and you need to contact cPanel Support staff if you are using it or check for MySQL logs whether any database is using too much CPU/Memory for run i said this because i am myself faced this issue few month before so find that database and optimize it. Thank You, Regards 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 2, 2010 Share Posted August 2, 2010 Maybe your mysql temp directory is full? That would cause some queries to work properly, but others will not. You could try turning on display_errors in configuration.php to see if it gives you more information. 0 Quote Link to comment Share on other sites More sharing options...
Gav Posted August 2, 2010 Author Share Posted August 2, 2010 Hi, I did open a support ticket and they were very helpful and gave me a file to test the mysql connection. The error that came up was too many connections, so flush hosts is fixing it temporarily. It seems strange though that other scripts are still able to connect to the same database using the same username/password. It should be ok after tonight, I'm moving the database to a different server that I just use for mysql. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.