Notifications
Clear all

[Solved] Urgent Help, Site is down after update to 2.0

161 Posts
5 Users
28 Reactions
7,339 Views
adisaputro
Posts: 128
(@adisaputro)
Estimable Member
Joined: 6 years ago

Cannot open the site, Error establishing a database connection.

6 Replies
adisaputro
(@adisaputro)
Joined: 6 years ago

Estimable Member
Posts: 128

It works now

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@adisaputro yes i keep getting database error connection, can anyone help with this?Β 

@Robert I am changing CSS as i go mate, just seeing what works and its looking better each time I add stuff πŸ™‚ I know some things will need changing and ill look into those bits when i have gone through everything, im still on the mission of add code from the old version and I will adjust the text in the footer and stuff soon πŸ™‚Β 

But yes, the database error is still popping up from time ot time, any suggestions?

Β 

dimalifragis
(@dimalifragis)
Joined: 5 years ago

Famed Member
Posts: 2611

@percysgrowroom

Just Enable Wordpress debug to a log and post the results here (hide sensitive info).

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@dimalifragis I dont know how to do that mate.... Do you have a guide i can read please?

dimalifragis
(@dimalifragis)
Joined: 5 years ago

Famed Member
Posts: 2611
Posted by: @percysgrowroom

@dimalifragis I dont know how to do that mate.... Do you have a guide i can read please?

https://wordpress.org/support/article/debugging-in-wordpress/

Put this in your wp-config.php

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );

Β 

and remove it when done. After a few hours check the log

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@dimalifragis thanks mate, ill get on it

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

1. Enable the database repairing mode of the WordPress: https://kinsta.com/blog/error-establishing-a-database-connection/#2-repairing-corrupt-database

2. Check database errors in wpForo > Tools > Database Tables Tab

3. Check other errors in wpForo > Tools > Debug > Errors & Issues Sub-tab

4. Increase the maximum number of database connection (max_connections) for MySQL in the hosting settings. Just ask your hosting support to do that.

Β 

4 Replies
(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@robert Thanks robert ill give that a shot and let you know how it goesΒ 

Β 

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

@percysgrowroom,

If you have a chance, update the MySQL to v8.0 version.

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@robert ill do that, thanks for your help mate

(@percysgrowroom)
Joined: 6 years ago

Noble Member
Posts: 1212

@robert done that, it is still happening πŸ™Β 

Β 

dimalifragis
Posts: 2611
(@dimalifragis)
Famed Member
Joined: 5 years ago

max_connections issues are logged if debug.log is enabled.

So it is easy to rule this out.

Posts: 1212
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

My host said this:

I could see the following MySQL queries are being executed on the server while navigating pages on site so, you should optimize the queries, and databases, and also repairing databases would probably fix the problem.

We have a Knowledge Base article that shows exactly what needs to be done:

https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin&source=gmail&ust=1663482487730000&usg=AOvVaw1vd7uPsCQjzGHVfnc82Ad W"> https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin

Furthermore, I have found the following Warning messages in the MYSQL logs which might be related to high resource usage in the server by MYSQL.

2022-09-17 1:00:36 35240 [Warning] Aborted connection 35240 to db: 'percysgr_wp03409' user: 'percysgr_wp03409' host: 'localhost' (Got an error writing communication packets)

Β 

I had these same issues when I updated to the last 1.0 version of wpforo ( 1.9.9.2 I think), which is why i didn't use it and revert back to 1.9.9.1 I think the version was ( one version before being up to date) We tried to fix it then too but it never worked so just went back to the more stable version.Β 

Ill try to get the databases optmised today, but im skeptical to think that this is going to work too. Any suggestions? Was something changed in the last two version of wpforo that can cause errors like this in the databases?

I use alot of add ons, maybe its one of those causing this. Is there any other users who have had similar issue? Maybe we can find the plug in thats clashing to causes these problems. Maybe its a cache plug in, maybe its an add on like polls or something.Β 

I hope we can get this fixed today, I would hate to go back to the old version of wpforo again, 2.0 has some great features. I appreciate any help you can offer, thanks everyone!Β 

3 Replies
Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

@percysgrowroom,

1. I don't see any information about the table, the error you've provided says nothing.

2. You said "done". What has been done? Have you updated to MySQL 8.0?

3. Also, let me know, have you increased the maximum database connections?

Β 

You have a lot of concurrent visitors and your hosting cannot handle that kind of requests. wpForo 2.0 has lots of new features, so it may connect to database more than the old versions. So you should provide such resources to let wpForo work well.

BTW, I've seen such problem only in your website. This is a single issue, so this is either a DDoS attack to your website or limited connections to your DB. Something is not regular with your hosting and website. The number of wpForo SQLs is the same for all websites, and we've never seen such problem. wpForo is well optimized and we're doing it in each version.

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

We've just found thatΒ Simple Lightbox plugin generates 98 duplicated queries. If you use this plugin, please deactivate it.

I'd recommend install the Query Monitor plugin and check the number of duplicated SQLs:

dimalifragis
(@dimalifragis)
Joined: 5 years ago

Famed Member
Posts: 2611

@robert If Simple Lightbox has that issue, i would HIGHLY recommend the MOST COMPATIBLE with everything plugin

https://wordpress.org/plugins/ari-fancy-lightbox/

I used it before switching to Kadence theme, that has a build-in lightbox that (surprise!!!) with wpForo embeded images.

Posts: 1212
Topic starter
(@percysgrowroom)
Noble Member
Joined: 6 years ago

I'll do what you have suggested and get back to you later. But I will say it's nothing to do with my host, my server is pretty big and should be able to handle everything fine. It did for a long time with no issues on the previous version on wpforo.Β 

It is also not a ddos attack, it only happens after I updated to 2.0. I understand that this issue may only be on my site, i was just asking here to see if anyone else had the same issues because they might now how to fix it.

Β 

This problem occured when I upgraded to the final versions of wpforo 1.0 and this is why I wasn't running the latest version. I was hoping 2.0 didn't have this problem but it seems it has. I'll try to find the cause and get back to you asap.Β 

Also, it may be down to me using more add one then most people do, maybe it's down to one of those. As I said I'll do some background checks and let you know. Thanks for your helpΒ 

Page 2 / 13