-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
refactor(client/config): increase the client's read timeout #2049
Conversation
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.
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. |
这个改动,是不是将这个spring.cloud.nacos.config.config-long-poll-timeout的时间增加了1.5倍,这个和手动配置更长的时间是一样可以获得相同的效果吧。 |
这两个timeout的含义不一样 |
按照上面的改动后,还是会有超时报错,次数不多,相比改之前减少很多,完整报错如下: [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 |
还需要修改server端调用逻辑,以后提pr
发自我的iPhone
在 2019年12月3日,09:59,hellotoworld <notifications@github.com> 写道:
按照上面的改动后,还是会有超时报错,次数不多,相比改之前减少很多,完整报错如下:
[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,<http://nacos-dev.internal.xxxxxx.com:80%EF%BC%8C> err : Read timed out
no available server
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2049?email_source=notifications&email_token=AFS35NDY2BZXAPYVATSRDPDQWW4P7A5CNFSM4JL42RDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFX2ABQ#issuecomment-560963590>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFS35NDBYZID4CVHBNK32ALQWW4P7ANCNFSM4JL42RDA>.
|
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:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.