You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "rnben (via GitHub)" <gi...@apache.org> on 2024/01/09 13:03:12 UTC
[I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
rnben opened a new issue, #104:
URL: https://github.com/apache/dubbo-getty/issues/104
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
-->
**What happened**:
```
2024/01/09 20:41:03 client response result: Hello, this request cost 7s
2024/01/09 20:41:12 client response result: Hello, this request cost 9s
2024/01/09 20:41:19 client response result: Hello, this request cost 7s
2024/01/09 20:41:27 client response result: Hello, this request cost 8s
2024/01/09 20:41:32 client response result: Hello, this request cost 5s
2024/01/09 20:41:38 client response result: Hello, this request cost 6s
2024/01/09 20:41:43 client response result: Hello, this request cost 5s
2024/01/09 20:41:48 client response result: Hello, this request cost 5s
2024/01/09 20:41:56 client response result: Hello, this request cost 8s
2024-01-09 20:41:56 WARN getty/getty_client.go:269 session {client:TCP_CLIENT:5:192.168.123.192:17947<->192.168.123.192:20000}, Read Bytes: 393, Write Bytes: 389, Read Pkgs: 4, Write Pkgs: 4, [session.WritePkg] @s.Connection.Write(pkg:[]byte{0xda, 0xbb, 0xc2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4e, 0x0, 0x0, 0x1, 0x41, 0x5, 0x32, 0x2e, 0x30, 0x2e, 0x32, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x9, 0x6d, 0x79, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x8, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x1f, 0x4c, 0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2f, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3b, 0x43, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65
, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x91, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x60, 0x48, 0x4, 0x63, 0x6f, 0x73, 0x74, 0x2, 0x36, 0x73, 0x5a, 0x48, 0x9, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x5, 0x67, 0x72, 0x6f, 0x75, 0x70, 0xa, 0x6d, 0x79, 0x41, 0x70, 0x70, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x9, 0x6d, 0x79, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1, 0x30, 0x5, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5, 0x66, 0x61, 0x6c, 0x73, 0x65, 0xb, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x3, 0x70, 0x72, 0x6f, 0x4, 0x70, 0x61, 0x74, 0x
68, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x44, 0x65, 0x6d, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x5a}) = err:write tcp 192.168.123.192:17947->192.168.123.192:20000: i/o timeout
github.com/apache/dubbo-getty.(*gettyTCPConn).send
C:/Users/ruben/Desktop/dubbo-demo/vendor/github.com/apache/dubbo-getty/connection.go:329
github.com/apache/dubbo-getty.(*session).WritePkg
C:/Users/ruben/Desktop/dubbo-demo/vendor/github.com/apache/dubbo-getty/session.go:408
dubbo.apache.org/dubbo-go/v3/remoting/getty.(*Client).transfer
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/remoting/getty/getty_client.go:269
dubbo.apache.org/dubbo-go/v3/remoting/getty.(*Client).Request
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/remoting/getty/getty_client.go:207
dubbo.apache.org/dubbo-go/v3/remoting.(*ExchangeClient).Request
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/remoting/exchange_client.go:131
dubbo.apache.org/dubbo-go/v3/protocol/dubbo.(*DubboInvoker).Invoke
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/protocol/dubbo/dubbo_invoker.go:153
dubbo.apache.org/dubbo-go/v3/filter/graceful_shutdown.(*consumerGracefulShutdownFilter).Invoke
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/filter/graceful_shutdown/consumer_filter.go:66
dubbo.apache.org/dubbo-go/v3/protocol/protocolwrapper.(*FilterInvoker).Invoke
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/protocol/protocolwrapper/protocol_filter_wrapper.go:127
dubbo.apache.org/dubbo-go/v3/cluster/cluster/failover.(*failoverClusterInvoker).Invoke
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/cluster/cluster/failover/cluster_invoker.go:86
dubbo.apache.org/dubbo-go/v3/proxy.DefaultProxyImplementFunc.func1.1
C:/Users/ruben/Desktop/dubbo-demo/vendor/dubbo.apache.org/dubbo-go/v3/proxy/proxy.go:202
main.main
C:/Users/ruben/Desktop/dubbo-demo/cmd/client/client.go:35
runtime.main
C:/Users/ruben/scoop/apps/go/current/src/runtime/proc.go:267
runtime.goexit
C:/Users/ruben/scoop/apps/go/current/src/runtime/asm_amd64.s:1650
2024-01-09 20:41:56 WARN proxy/proxy.go:212 [CallProxy] received rpc err: Failed to invoke the method SayHello in the service org.apache.dubbo.DubboDemoProvider.Test. Tried 0 times of the providers [dubbo://:@192.168.123.192:20000/?interface=org.apache.dubbo.DubboDemoProvider.Test&group=myAppGroup&version=myversion] (1/1)from the registry nacos://127.0.0.1:8848?nacos.access=&nacos.group=myGroup&nacos.namespaceId=&nacos.password=&nacos.secret=&nacos.timeout=5s&nacos.username=®istry=nacos®istry.group=myGroup®istry.label=true®istry.namespace=®istry.preferred=false®istry.role=0®istry.timeout=5s®istry.ttl=15m®istry.weight=0®istry.zone=&remote-client-name=dubbo.registries-nacos-127.0.0.1%3A8848&simplified=false on the consumer 192.168.123.192 using the dubbo version 3.0.4. Last error is write tcp 192.168.123.192:17947->192.168.123.192:20000: i/o timeout.: write tcp 192.168.123.192:17947->192.168.123.192:20000: i/o timeout
panic: write tcp 192.168.123.192:17947->192.168.123.192:20000: i/o timeout
goroutine 1 [running]:
main.main()
C:/Users/ruben/Desktop/dubbo-demo/cmd/client/client.go:37 +0x25a
```
**What you expected to happen**:
The following configuration file shows that the `request-timeout` has been set to 1minute, which is valid.
However, a write timeout error always occurs after multiple requests,In fact, the request does not exceed 10s!!
I find that commenting out `currentTime.Sub(t.wLastDeadline.Load()) > t.wTimeout.Load()>>2` can solve this problem.

**How to reproduce it (as minimally and precisely as possible)**:
It can be reproduced by running the demo program。
https://github.com/rnben/dubbo-demo/blob/master/README.md
**Anything else we need to know?**:
```dubbo-client.yaml
dubbo:
application:
name: myApp # metadata: application=myApp; name=myApp
module: opensource #metadata: module=opensource
group: myAppGroup # no metadata record
organization: dubbo # metadata: organization=dubbo
owner: laurence # metadata: owner=laurence
version: myversion # metadata: app.version=myversion
environment: pro # metadata: environment=pro
registries:
nacosWithCustomGroup:
protocol: nacos
address: 127.0.0.1:8848
group: myGroup # default is DEFAULT_GROUP
registry-type: interface
# namespace: 9fb00abb-278d-42fc-96bf-e0151601e4a1 # default is public
consumer:
request-timeout: 1m
references:
DubboDemoProvider:
protocol: dubbo
interface: org.apache.dubbo.DubboDemoProvider.Test
retries: 0
```
All the other information is there:https://github.com/rnben/dubbo-demo
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks closed issue #104: "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently
URL: https://github.com/apache/dubbo-getty/issues/104
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "rnben (via GitHub)" <gi...@apache.org>.
rnben commented on issue #104:
URL: https://github.com/apache/dubbo-getty/issues/104#issuecomment-1896003638
> Would you please give an example just using getty without dubbo-go to reproduce this problem?
This may be the same problem: https://github.com/AlexStocks/getty/issues/14
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #104:
URL: https://github.com/apache/dubbo-getty/issues/104#issuecomment-1989974611
> 把超时时间设置短点 `request-timeout`
@rnben 不知道你的超时时间设置了多长?设置 3s 就足够了,不要太长,如 30s。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "zhaoyunxing92 (via GitHub)" <gi...@apache.org>.
zhaoyunxing92 commented on issue #104:
URL: https://github.com/apache/dubbo-getty/issues/104#issuecomment-1989970096
把超时时间设置短点 `request-timeout`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "rnben (via GitHub)" <gi...@apache.org>.
rnben commented on issue #104:
URL: https://github.com/apache/dubbo-getty/issues/104#issuecomment-1895677885
> Would you please give an example just using getty without dubbo-go to reproduce this problem?
I will try it, and I noticed that dubbo-go uses getty RPCClient to maintain multiple getty.Session, randomly selecting one for each request, which may be related to this. It is possible to obtain a session whose deadline is about to expire or has expired.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] "write tcp xxx:17947->yyy:20000: i/o timeout" occurs frequently [dubbo-getty]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #104:
URL: https://github.com/apache/dubbo-getty/issues/104#issuecomment-1894839557
Would you please give an example just using getty without dubbo-go to reproduce this problem?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org