0

I am facing some occasional database related issues for my app, where more than half a million users are registered, a few thousand of requests coming every minute to the server the app performs very well and server response time is good but every day for some time the database related errors start popping, I have attached a few screenshots of different kind of errors The database is MySQL(v5.7) and the backend is running on Codeigniter3 (PHP v5.6) I believe it happens during the peak usage period mostly in the evening

Showing the connectivity error which comes quite often when the problem starts happening]: enter image description here

The error says

Unable to connect to your database server using the provided settings
Filename: third_party/MX/Base.php
Line Number: 55

The above error may look like the configuration settings are incorrect but the application runs fine with the same settings

This is another error which appears sometimes: enter image description here

Error Number: 9001
Max connect timeout while reaching hostgroup 11 after 11043ms
SELECT * FROM `uc_role_rights` WHERE `user_role_id` = '1' AND `module_id` = 18 AND `module_view` = 1
Filename: modules/settings/models/Settings_model.php
Line Number: 100 

Few more information which may help you to understand it

  1. max_connections is set to 151
  2. In Codeigniter's database connection configuration pconnect is set to FALSE
  3. Used dbdriver is mysqli
  4. Database hosted on 'localhost'

I'd appreciate any help to reach to the root of the problem. Thanx

BEingprabhU
  • 1,618
  • 2
  • 21
  • 28
  • 1
    Please add the error message in readable form to your question. Text can be shared best as text, not as an image – Nico Haase Feb 21 '20 at 09:17
  • 1
    Thanx Nico, I have added the error text in the question's body – Brij Raj Kunwar Patel Feb 21 '20 at 09:26
  • [You can check this reference link to get idea about, for solving your problem](https://stackoverflow.com/questions/7254049/codeigniter-unable-to-connect-to-your-database-server-using-the-provided-settin) – coderboy_11 Feb 21 '20 at 09:32
  • This is not a programming problem. Suggest taking it to [sf] or https://dba.stackexchange.com – miken32 Feb 21 '20 at 18:26

0 Answers0