An unexpected database error occurred. Please try again later.

CoinBit

Member
Hi. I upgraded the Xenforo from 2.2 to 2.3 and it's giving me this error.

An unexpected database error occurred. Please try again later.

upon checking the source code it says

<!-- User &#039;u811976095_maghrib_pk1607&#039; has exceeded the &#039;max_user_connections&#039; resource (current value: 100) -->

The website works sometimes and then down again. I was out and it stopped working again and haven't come online since 2 hours. The upgraded is very buggy as it destroyed all my skins and probably playing with the add-ons. I have changed the default skin to Xenforo's original and turned off most of the add-ons and was hopefully it is fixed. Any advice will be helpful.

I also checked for years my resources used at the host were not exceeding 8-10% but now suddenly its throwing errors like the following.

Thank you


Resources Usage _ Hostinger.webp
 
until yesterday i had a database disk space of 1.2gb. Today it says I have used all of my space and it's 6.2gb? How? and there has been no change on the website besides this forum software upgrade?
 
Not yet, check the control panel to see what errors are being logged first. It may have clues as to what caused the initial performance degradation.
 
Not yet, check the control panel to see what errors are being logged first. It may have clues as to what caused the initial performance degradation.
The hosting provider said I have exceeded the limits of database. The website is not showing anymore so I cannot access the control panel
 
You can truncate (not drop) the table, but you should keep an eye on the error log whenever you are trying to troubleshoot issues.
just a few hours ago, I checked the database size was 1.2gb. It has increased all of a sudden and it is unbelievable. The only change I have made since yesterday is the upgrade of the forum software to Xenforo 2.3

I have never attempted to restore the database for Xenforo but have experience about Wordpress. If I restore the database from the list of backups, will it help?
 
You can truncate (not drop) the table, but you should keep an eye on the error log whenever you are trying to troubleshoot issues.
so should I use something like

TRUNCATE TABLE xf_error_log;

or manually drop the rows inside the table? Kindly advice.

Almost all of the error are from this file src/XF/Template/Templater.php
 
TRUNCATE TABLE xf_error_log;
Yeah that should be ok. Ideally you should take a backup before performing any manual database operations. The contents of this table can be excluded if it helps.

This is what is inside the error_log table
We'll need to see the full message and stack trace to make a complete determination. They will be available in the control panel once the site is up and new errors are logged.
 
Yeah that should be ok.


We'll need to see the full message and stack trace to make a complete determination. They will be available in the control panel once the site is up and new errors are logged.
I have truncated and the database dropped to 1800mb.

But the site is still down. I hope it doesn't go back to 6gb again :(
 
What error is the site currently down with?
An unexpected database error occurred. Please try again later.

It usually starts working itself whenever I see this error. But this time it suddenly increased the database size as mentioned earlier so had to truncate the table. No other changes are made

Both CPU and Processes are hitting 100% of the capacity with processes saying 1000 faults
 
Without more data on which processes are faulting and how, it's difficult to diagnose the issue further. I still strongly recommend applying the patch I linked previously as it may cause performance degradation. If you are able to eventually access admin.php?logs/server-errors/ then an error trace would be helpful. Disabling listeners again may also help in the meantime.
 
This is what is inside the error_log table


View attachment 306319
It looks like you're using phpMyAdmin, if that is the case then....
  • On your screen right above the area you did a screen shot of, you should see a button labeled "Extra Options", click that.
  • You'll see a menu appear on the screen.
  • Turn on the radio button "Full Texts".
  • Click the "Go" button.
You should now see the full error message text when viewing the error log.

The message, filename, and trace_string columns are what you're after.

Depending on where the error is coming from, it might be useful to also turn on the Show BLOB Contents radio button and then grab the value in the request_state column.


1721251093659.webp
 
Without more data on which processes are faulting and how, it's difficult to diagnose the issue further. I still strongly recommend applying the patch I linked previously as it may cause performance degradation. If you are able to eventually access admin.php?logs/server-errors/ then an error trace would be helpful. Disabling listeners again may also help in the meantime.
I have applied the patch but still it didn't help. The only change is the home page partially opened (header but no nodes) with the error that couldn't load the full page.

Later on, the CPU performance went back to 100%.

It looks like you're using phpMyAdmin, if that is the case then....
  • On your screen right above the area you did a screen shot of, you should see a button labeled "Extra Options", click that.
  • You'll see a menu appear on the screen.
  • Turn on the radio button "Full Texts".
  • Click the "Go" button.
You should now see the full error message text when viewing the error log.

The message, filename, and trace_string columns are what you're after.

Depending on where the error is coming from, it might be useful to also turn on the Show BLOB Contents radio button and then grab the value in the request_state column.


View attachment 306320
I had truncated the error_log due to its size of 4gb. So now that table is empty. It means the Extra Options button no longer appears :(
 
Do other pages load? Does that result in any errors being in the control panel? Have you disabled listeners again?
Nothing loads. That page only appeared 2 or 3 times after the Patch was applied. But it mostly continues to say "An unexpected database error occurred. Please try again later."

The listeners are disabled since last 6 hours. So I am guessing the plugins cannot interface. I did turn on the skins as they seemed to have been behaving normally. Is there any command I can add to turn them off from through the config file?
 
Back
Top Bottom