最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - Global__r connection timed out

programmeradmin2浏览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/wp-login.php',\n'server' => ,\n'host' => replica_db_link,\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/ads/recordmetrics/53251/rotation',\n'server' => ,\n'host' => replica_db_link,\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: /`

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/wp-login.php',\n'server' => ,\n'host' => replica_db_link,\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/ads/recordmetrics/53251/rotation',\n'server' => ,\n'host' => replica_db_link,\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/articles/article_name/`

Share Improve this question edited Feb 20, 2020 at 17:18 Tom J Nowell 61.1k7 gold badges79 silver badges148 bronze badges asked Feb 20, 2020 at 16:59 GnosisGnosis 134 bronze badges 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
Add a comment  | 

1 Answer 1

Reset to default 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.

发布评论

评论列表(0)

  1. 暂无评论