XF 2.3 "/whats-new/posts/" returns DB error

Kevin

Well-known member
Note: I've already submitted a support ticket earlier today, hoping maybe others may have ran into this while waiting for the guys to work the ticket. I'm stumped on this one. :(

*****

I have multiple XF installs on the same server. When doing a /whats-new/posts/ query at one of the installs I'm getting the dreaded "An unexpected database error occurred. Please try again later." error and can't figure out why.

The error is only happening with /whats-new/posts/ -- other searches, like /whats-new/media/ & /whats-new/latest-activity/ are still working and I can still do a 'search' function for keywords, it's only /whats-new/posts/ that is failing.

I started with disabling XFES and other add-ons that affect 'search' and same result. I then tried disabling all listeners in config.php and got the same result. I've tried rebuilding search index, etc. and still get the same result. I don't see any indicators of crashed tables in the DB. Nothing is revealing itself in the error logs.

The problem started happening in the past few hours so there's been no changes to the XF install or (to my knowledge, unless the host did something) to the server environment. Other XF installs on the same server seem to be working fine yet.

What is interesting is I tried a test of /whats-new/posts/123 instead of the normal /whats-new/posts/ and it works! But.... I don't know what that is telling me. :(

Any thoughts?
 
When you receive this message you can usually view the page source and find an error message an HTML comment, or inspect your PHP error logs for more details.
Here's what's the source showing:
Code:
An unexpected database error occurred. Please try again later.
<!-- No such file or directory -->


I've checked both the SQL error log and the error log in the XF folder, nothing is revealing itself.
 
I can't explain why this would only happen on one specific page, but usually this error means the database socket can't be found at the path configured in php.ini.

If you're using localhost as the database host in src/config.php, you might try replacing it with 127.0.0.1 to force it to connect over TCP/IP instead. For what it's worth, these pages don't use the search system.
 
I can't explain why this would only happen on one specific page,
Which is why I'm stumped, honestly. Past search issues generally broke all of search, not just the generic route, and past experience is why I started with disabling XFES & any related add-ons.

but usually this error means the database socket can't be found at the path configured in php.ini.

If you're using localhost as the database host in src/config.php, you might try replacing it with 127.0.0.1 to force it to connect over TCP/IP instead. For what it's worth, these pages don't use the search system.
Just tried, restarted httpd, same result. Everything but /whats-new/posts/ comes back as normal and /whats-new/posts/123 comes back but /whats-new/posts/ gives the DB error.
 
Back
Top Bottom