1

I'm using MariaDB slave(Read only) for my web server and other services. Which works fine for few weeks and suddenly MariaDB stops responding to pdo requests. Web servers also start running at high CPU usage(100%) at the same time. MariaDB serving other services but not the pdo. Everything starts working again if I disconnect pdo session from the MariaDB process list or restart MariaDB service. Please help me figuring out this issue.

OS: Debian 10 Buster Server version: 10.5.5-MariaDB-1:10.5.5 nginx version: nginx/1.20.2 php7.1-fpm

Restarting the web services does not help. Network connectivity is fine, there is nothing in the error logs (all nginx, php and mysql).

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
Jack
  • 11
  • 1
  • What exact errors do you get from the PHP code? If the server isn't responding then there should be errors in PHP (unless you forgot to enable PDO error handling in your code). Have you enabled the more detailed logging in MySQL to see if that reveals anything? There's no concrete problem for us to look at here...not much we can do until you provide more details / do more investigation. See also [ask], how to provide a [mre] of the issue, and the [tour]. – ADyson Feb 28 '23 at 12:49
  • And/or can you identify a specific query which causes the problem? Maybe you have some sort of highly inefficient SQL which is hogging CPU and/or bandwidth and/or keeping a connection open for ages. – ADyson Feb 28 '23 at 12:50
  • @ADyson Thanks, I will get back to you with more details. – Jack Feb 28 '23 at 13:13
  • I edited the question because you said you are using MariaDB, not MySQL. These are different products, and solutions for one are not necessarily relevant to the other. – Bill Karwin Feb 28 '23 at 16:09

0 Answers0