0

I'm getting some errors that I can't track down. I tried adjusting the time outs for the maria db connection but this doesn't look to be the issue so I figured I'd ask to see if anyone could offer some clues. The sites are running off of a read/replica setup with RDS Master / Replica databases. We use W3TC for caching with redis.

I've modified the IP, sites, and db links for privacy. Here are two examples, there are many other calls that are returning the same error Connection timed out,\n'errno' => 2002,\n'server_state' => up\n'lagged_status'.

[Thu Feb 20 11:45:38.841839 2020] [php7:notice] [pid 25575] [client fake_ip55.55.55.55:36330] WordPress database error 2020-02-20 16:45:38 Can't select global__r - \n'referrer' => 'www.example.com/wp-login.php',\n'server' => ,\n'host' => replica_db_link.com,\n'error' => Connection timed out,\n'errno' => 2002,\n'server_state' => up\n'lagged_status' => 3 for query SELECT wp_users.* FROM wp_users INNER JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) WHERE 1=1 AND ( \n ( \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"administrator\"%' ) \n OR \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"editor\"%' ) \n OR \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"author\"%' )\n )\n) ORDER BY user_nicename ASC made by WP_User_Query::query`

and:

[Thu Feb 20 11:27:34.765842 2020] [php7:notice] [pid 38673] [client fake_ip55.55.55.55:56706] WordPress database error 2020-02-20 16:27:34 Can't select global__r - \n'referrer' => 'www.example.com/ads/recordmetrics/53251/rotation',\n'server' => ,\n'host' => replica_db_link.com,\n'error' => Connection timed out,\n'errno' => 2002,\n'server_state' => up\n'lagged_status' => 3 for query SELECT wp_users.* FROM wp_users INNER JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) WHERE 1=1 AND ( \n ( \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"administrator\"%' ) \n OR \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"editor\"%' ) \n OR \n ( wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%\"author\"%' )\n )\n) ORDER BY user_nicename ASC made by WP_User_Query::query, referer: https://www.example.com/articles/article_name/`

4
  • 2
    A quick google for select global__r reveals jjj.blog/tag/global__r, note that if you're using HyperDB that's very important information to know that's missing from your question. Also keep in mind that W3TC support is offtopic here
    – Tom J Nowell
    Commented Feb 20, 2020 at 17:19
  • Hi Tom, thanks for the edit. We are not using hyperDB. I'm not sure if W3TC is the culprit but figured I'd mention it.
    – Gnosis
    Commented Feb 20, 2020 at 17:23
  • How are you working with multiple databases if you aren't using HyperDB? WordPress doesn't support this out of the box
    – Tom J Nowell
    Commented Feb 20, 2020 at 17:25
  • I stand corrected. We are using HyperDB.
    – Gnosis
    Commented Feb 20, 2020 at 17:30

1 Answer 1

1

You're getting this because HyperDB cannot reach one of your database servers. It might be down, unresponsive, or unreachable. You'll need to check on the servers themselves to find out what the issue is.

1
  • Thanks Tom. I managed to clear most of the errors by increasing the timeout and lag_threshold for the replica in the db-config.php file
    – Gnosis
    Commented Feb 20, 2020 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.