WordPress database ...
 
Notifications
Clear all

wpForo 1.x.x [Closed] WordPress database error Routing query to backend failed - urgent

7 Posts
4 Users
0 Reactions
1,108 Views
Posts: 22
Topic starter
(@etrimon)
Eminent Member
Joined: 5 years ago

Hallo wpForo team,

our server gives us following error:

WordPress database error Routing query to backend failed

It is in the get_post_url() function in class-posts.php.

This query is causing the trouble and returns wrong urls.

$sql = "SELECT tmp_view.`rownum` FROM
(SELECT @rownum := @rownum + 1 AS rownum, p.`postid`
FROM `" . WPF()->tables->posts . "` p
CROSS JOIN ( SELECT @rownum := 0 ) AS init_var
WHERE p.`topicid` = %d
" . $where . "
ORDER BY " . $orderby . ") AS tmp_view
WHERE tmp_view.`postid` = %d";

Please, help with this!

6 Replies
Posts: 1602
(@anonymous20)
Noble Member
Joined: 9 years ago

This usually comes from MariaDB Maxscale, do you use any of those?

If the rest of WP working right?

Also i see this from you:

https://wpforo.com/community/general-forums-bug-reports/wpforonoticesinit-using-95-70-000ms-in-loading/

It seems something bigger is going on.

4 Replies
(@nullsetprod)
Joined: 5 years ago

Active Member
Posts: 6

@anonymous20

Why is my post anything to do with his error ?

(@nullsetprod)
Joined: 5 years ago

Active Member
Posts: 6

And it is stil doing this wpforonoticeinit it is up into 140.000ms or more now

(@anonymous20)
Joined: 9 years ago

Noble Member
Posts: 1602
Posted by: @nullsetprod

@anonymous20

Why is my post anything to do with his error ?

Apologies, i posted a wrong topic link. Can't edit it now.

(@nullsetprod)
Joined: 5 years ago

Active Member
Posts: 6

@anonymous20

So you seem to be the guy to know it, any idea what cause these huge spikes.

 

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

Hi @etrimon,

There should not be such error. I think you've done some manipulation with the database or the data are wrong migrated from other database and forum software. Here are the steps you should check and do:

1. make sure there is no problem with forum database tables in Dashboard > Forums > Tools > Debug > Tables admin page.

2. Make sure your Database Server is up to date. It should be MySQL 5.6 / 5.7 or MariaDB 10.2 / 10.3 / 10.4.

3. make sure wpForo database tables use InnoDB Engine, use Hosting Service cPanel > phpMyAdmin tool to check. wpForo tables have wp_wpforo_ prefix.

4. Update wpForo data, go to Dashboard > Forums > Dashboard and click on following buttons with the same order:

  • [Rebuild Threads]
  • [Update Topic Statistic]
  • [Update Forum Statistics]
  • [Delete All Caches]