• Hello,

    I hope someone has an idea what is going on with WordPress on newer platforms. I have several sites that have been running fine, some for more than 10 years. However, with recent upgrades of the server and newer versions of PHP, the sites run for a few days and then fall over with ‘Error establishing a database connection’. The only solution is to restart the database and the apache2 server.

    This seems to have started a few months ago after upgrades, or whenever I set up a new site.

    I have checked all the explanations for why ‘Error establishing a database connection’ occurs and it is not any of those. I believe (been writing PHP since Rasmus Lerdorf made the first release in the 90s) that there is something wrong with the database connector in newer versions of PHP that makes it fall over after some time. I cannot think of anything else that would make all sites behave the same irrespective of what WordPress plugins they are using (dkeats.com and kengalearn.com have no overlap in plugins but both behave the same way).

    Has anyone else noticed this increase in database connection errors? Does the community have any ideas of a work-around?

    Thanks
    Derek

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • I run/manage several very large sites with WordPress 6.2 + PHP 8.2 + MySQL 8 (and MariaDB 10) on Ubuntu 22 without any issues. Many WordPress hosting providers also run millions of client sites with these “newer platforms” exclusively, or by default.

    What’s the status of your MySQL server when this problem occurs? And I don’t just mean whether it’s up or down… but is it able to actually handle new connections?

    Also, do check your server’s access and error logs (Apache, MySQL, etc) to see what’s happening behind the scenes when this database connection error occurs. Turn on WordPress debugging and tweak your MySQL logging if necessary.

Viewing 1 replies (of 1 total)
  • The topic ‘Increase in database connection over the past few months’ is closed to new replies.