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

refactor(client/config): increase the client's read timeout #2049

Merged
merged 2 commits into from
Nov 14, 2019
Merged

refactor(client/config): increase the client's read timeout #2049

merged 2 commits into from
Nov 14, 2019

Conversation

chuntaojun
Copy link
Collaborator

@chuntaojun chuntaojun commented Nov 12, 2019

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

fix issue #1723#2056

Brief changelog

In order to prevent the server from handling the delay of the client's long task, increase the client's read timeout to avoid this problem.

(为了防止服务器端处理客户端长的任务出现延迟情况,调大客户端的读取超时时间,避免出现此问题的出现)

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

In order to prevent the server from handling the delay of the client's long task, increase the
client's read timeout to avoid this problem.
@CLAassistant
Copy link

CLAassistant commented Nov 12, 2019

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ chuntaojun
❌ liaochuntao


liaochuntao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nkorange nkorange merged commit bad3501 into alibaba:develop Nov 14, 2019
@s2288156
Copy link

这个改动,是不是将这个spring.cloud.nacos.config.config-long-poll-timeout的时间增加了1.5倍,这个和手动配置更长的时间是一样可以获得相同的效果吧。
设置spring.cloud.nacos.config.config-long-poll-timeout=600000,与使用默认值30000的服务对比,仍然会出现相同的异常,只不过是600000出现异常的次数变少了

@chuntaojun
Copy link
Collaborator Author

这个改动,是不是将这个spring.cloud.nacos.config.config-long-poll-timeout的时间增加了1.5倍,这个和手动配置更长的时间是一样可以获得相同的效果吧。
设置spring.cloud.nacos.config.config-long-poll-timeout=600000,与使用默认值30000的服务对比,仍然会出现相同的异常,只不过是600000出现异常的次数变少了

这两个timeout的含义不一样

@hellotoworld
Copy link

按照上面的改动后,还是会有超时报错,次数不多,相比改之前减少很多,完整报错如下:
[fixed-nacos-dev.internal.xxxxxx.com_80-929e9f28-c19d-4a36-9d78-5f13c89eb1a1] [sub-server] get server config exception, dataId=xxx-public-tx-sit.properties, group=DEFAULT_GROUP, tenant=929e9f28-c19d-4a36-9d78-5f13c89eb1a1

[fixed-nacos-dev.internal.xxxxxx.com_80-929e9f28-c19d-4a36-9d78-5f13c89eb1a1] [get-config] get from server error, dataId=xxx-public-tx-sit.properties, group=DEFAULT_GROUP, tenant=929e9f28-c19d-4a36-9d78-5f13c89eb1a1, msg=ErrCode:500, ErrMsg:no available server

[fixed-nacos-dev.internal.xxxxxx.com_80-929e9f28-c19d-4a36-9d78-5f13c89eb1a1] [get-config] get snapshot ok, dataId=xxx-public-tx-sit.properties, group=DEFAULT_GROUP, tenant=929e9f28-c19d-4a36-9d78-5f13c89eb1a1, config=

[NACOS SocketTimeoutException httpGet] currentServerAddr:http://nacos-dev.internal.xxxxxx.com:80, err : Read timed out

no available server

@chuntaojun
Copy link
Collaborator Author

chuntaojun commented Dec 3, 2019 via email

@chuntaojun chuntaojun linked an issue Mar 30, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nacos 配置中心,java.net.ConnectException: no available server
5 participants