Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于eureka.server.peer-node-read-timeout-ms的查看和调整 #4977

Closed
zihan524 opened this issue Sep 21, 2023 · 8 comments
Closed

关于eureka.server.peer-node-read-timeout-ms的查看和调整 #4977

zihan524 opened this issue Sep 21, 2023 · 8 comments
Labels

Comments

@zihan524
Copy link

我有两台config在同一个数据中心,另外两台config在另外一个数据中心,4台config组成一个集群,两个数据中心之间可能偶发性的网络延迟有一点大,网络是专线连接的,config偶发性的报错,请问如何查看和修改eureka.server.peer-node-read-timeout-ms参数。

2023-09-21 14:10:14.021 ERROR 14142 --- [TaskBatchingWorker-target_x.x.x.x-13] c.n.e.cluster.ReplicationTaskProcessor : It seems to be a socket read timeout exception, it will retry later. if it continues to happen and some eureka node occupied all the cpu time, you should set property 'eureka.server.peer-node-read-timeout-ms' to a bigger value

@dosubot
Copy link

dosubot bot commented Sep 21, 2023

🤖

您可以通过在Apollo配置管理系统中的'application-custom-defined-discovery.properties'文件中添加此参数来查看和修改'eureka.server.peer-node-read-timeout-ms'参数。

以下是操作步骤:

eureka.server.peer-node-read-timeout-ms=您想要设置的值

将'您想要设置的值'替换为您想要为'eureka.server.peer-node-read-timeout-ms'参数设置的值。此值以毫秒为单位,决定了从对等eureka节点读取数据的超时时间。

请注意,更改此文件后,需要重启Apollo服务才能生效。

参考源码:

关于'eureka.server.peer-node-read-timeout-ms'在Apollo配置管理系统中的默认值,我在仓库中没有找到答案,但答案可能在其他地方可用,或者我可能错过了。

另外,根据我在Apollo仓库中找到的类似问题,这个错误通常表示服务器响应慢。如果此错误只偶尔发生,并且元服务器返回正确的数据(/services/config, /services/admin),那么可能不是问题。但是,建议检查服务器状态,如cpu/mem/gc等。还可以检查eureka.service.url配置,可能存在配置错误或机器性能下降。

参考问题:

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@zihan524
Copy link
Author

感谢,我是直接下载的github上apollo 2.1编译过程序部署的,我看apollo-adminservice-2.1.0.jar包里的BOOT-INF/classes目录下有个application-custom-defined-discovery.properties文件,可以直接修改这个上传吗?

@nobodyiam
Copy link
Member

不用修改包里的配置文件,直接在部署目录下的 config/application-github.properties 加就可以。
另外,如果是两个机房的话,可以考虑单独组成集群

@zihan524
Copy link
Author

@nobodyiam 感谢,目前我的架构是这样的。
环境信息:
A机房,部署2台portal,2台admin+config,2台数据库
B机房,部署1台portal,2台admin+config,1台数据库
一共10台主机。

数据库容灾:
a机房主从同步,a机房和b机房也是主从同步,整体数据库同步架构是一主两从

应用配置:
a机房2台porta、b机房1台portal使用同一个slb,提供统一的portal服务
a机房2台admin+config、b机房2台admin+config,组成一个集群(eureka.service.url设置了4个地址)
所有的portal、admin+config都连接a机房的同一套数据库。
portal访问meta也是使用的slb

请问这种架构可以吗?目前就是报eureka.server.peer-node-read-timeout-ms超时的错误,可以通过调整来解决吗?
另外eureka.server.peer-node-read-timeout-ms是在admin和config的配置文件都修改呢吧?

@nobodyiam
Copy link
Member

eureka.server.peer-node-read-timeout-ms 看配置名称在 config service 的配置文件中修改就可以

@zihan524
Copy link
Author

@nobodyiam 我的admin和config日志都会偶尔有这个报错,我在admin和config的配置文件都增加了eureka.server.peer-node-read-timeout-ms=10000,改成10秒了,在网上查的这个参数默认是200ms,改造后重启,貌似目前没有这个告警了,另外我们机房是专线连接,所以就多中心对等应用多活部署了,这样架构更简单点。

@stale
Copy link

stale bot commented Oct 24, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 24, 2023
Copy link

stale bot commented Nov 1, 2023

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants