Error establishing a database connection

Website URL

http://ronlerner.me/wp-admin

Error Message


This happens when I try to do anything in wordpress

Other Information

77 hours ago I added a custom domain

I believe there was an outage on the SQL server. Have you confirmed the database credentials? The /wp-admin page appears to be working, which indicates that the database is connected.

5 Likes

what can I do it fix it, it is still showing error when I try to edit page

Can you enable WP_DEBUG to get more information about the issue?

Also, did you do this?

4 Likes

I don’t know how to do that, sorry. Can you please explain how to use wp-debug and verify credentials?

I have enabled wp-debug I belive, what do I do next?

This is the error I get on homescreen for wp-admin

Deprecated : Using ${var} in strings is deprecated, use {$var} instead in /home/vol1_3/infinityfree.com/if0_35333169/ronlerner.me/htdocs/wp-content/plugins/wpforms-lite/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php on line 46

The next step is to reproduce the issue. You were saying you had problems with the database connection? Then please try to trigger that error again. With WP_DEBUG enabled, you should get a much more detailed error message.

You can ignore deprecation warnings. This warning means that the wpforms-lite plugin is using code that will stop working in a future PHP version. You don’t need to concern yourself with that.

4 Likes

I don’t get the error anymore so it might have been an sql server down. Thank you for your support I am unable to reproduce the issue anymore.

I have successfully reproduced the error by clicking on the Astra button on dashboard causing the problem to show. Also the Astra theme forced me to set wp-debug to be false. Also after trying to repoduce it now stops showing, and in other attempts clicking on anything such as plugins also causes error message, but then after 2nd attempt issue is inapparent.

It could be a max_user_connections issue, some heavy WordPress sites have the tendency to cause those.

Every database user is only allowed to have a limited number of database connections. If that limit is hit, additional connections cannot be opened until the number of active connections is reduced. This could explain why you only get the error sometimes: even a website that uses too many database connections will only sometimes see this issue.

3 Likes

What do I?

Reduce the number of plugins used?

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.