XF 2.2 An unexpected database error occurred. Please try again later.

sneakyy

Member
I run into this issue randomly. The website works fine. Everything works as normal. Randomly the mariadb needs restarting. But the weird thing is I have other websites not using xenforo using the same database same socket same everything but only xenforo needs the mariadb to be restarted for the website to continue working. As a temporary fix I’ve made it so the mariadb restarts every hour but it’s not a long term fix. Anyone have any idea on what’s going on here. I couldn’t see anything in the nginx logs. I couldn’t find any other error. Other than the occasional white screen error from the xenforo 2 site saying

An unexpected database error occurred. Please try again later.

Thanks for reading. Hopefully we find a fix.
 
Do you ever see any errors in the admin log that coincide with this?

Are you on a shared SQL database with other people? It could just be hitting max connections issue?
 
I run into this issue randomly. The website works fine. Everything works as normal. Randomly the mariadb needs restarting. But the weird thing is I have other websites not using xenforo using the same database same socket same everything but only xenforo needs the mariadb to be restarted for the website to continue working. As a temporary fix I’ve made it so the mariadb restarts every hour but it’s not a long term fix. Anyone have any idea on what’s going on here. I couldn’t see anything in the nginx logs. I couldn’t find any other error. Other than the occasional white screen error from the xenforo 2 site saying

An unexpected database error occurred. Please try again later.

Thanks for reading. Hopefully we find a fix.
This is the output...

An unexpected database error occurred. Please try again later.
<!-- MySQL statement prepare error [1146]: Table &#039;databasename.xf_data_registry&#039; doesn&#039;t exist -->
 
Last edited by a moderator:
Do you ever see any errors in the admin log that coincide with this?

Are you on a shared SQL database with other people? It could just be hitting max connections issue?
No error logs in the admin area that relate to this error. The MySQL server is shared between 2 of my own websites, we have 3 websites total on this VPS it has more than enough resources to handle the load it's under. it's just MySQL being all weird.
 
I did however just find a mariadb issue.

tail -f mariadb.log
2024-03-18 23:31:28 0 [Note] InnoDB: Buffer pool(s) load completed at 240318 23:31:28
2024-03-18 23:31:28 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-03-18 23:31:28 0 [Warning] mysqld: GSSAPI plugin : default principal 'mariadb/host-reverse-dns@' not found in keytab
2024-03-18 23:31:28 0 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure. Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
2024-03-18 23:31:28 0 [ERROR] Plugin 'gssapi' init function returned error.
2024-03-18 23:31:28 0 [Note] Server socket created on IP: '127.0.0.1'.
2024-03-18 23:31:28 0 [Note] Reading of all Master_info entries succeeded
2024-03-18 23:31:28 0 [Note] Added new Master_info '' to hash table
2024-03-18 23:31:28 0 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.3.39-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server

Even when I found the gss module to comment it out and restart mariadb it still shows the original error I was facing.

An unexpected database error occurred. Please try again later.
 
Back
Top Bottom