You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "nulinuli-nuli (via GitHub)" <gi...@apache.org> on 2023/12/19 02:29:58 UTC
[I] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
nulinuli-nuli opened a new issue, #13539:
URL: https://github.com/apache/dubbo/issues/13539
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.5
* Operating System version: CentOs7.5
* Java version: 1.8
### Steps to reproduce this issue
1. xxx
2. xxx
3. xxx
Pls. provide [GitHub address] to reproduce this issue.
### Expected Behavior
<!-- What do you expect from the above steps?-->
想知道有什么办法能够解决,现在服务下线时导致客户端大量超时,没有实现优雅停机
### Actual Behavior
<!-- What actually happens? -->
服务端停机时,即使设置了dubbo.service.shutdown.wait=30000,参数回调方法也没有回调客户端,导致客户端大量超时。
```
Just put your stack trace here!
```
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863761544
> 有日志吗? 另外,停止服务是方式是?
我想知道2.7.5版本支不支持参数回调方法的优雅停机,对于同步方法,服务端停机时,客户端感知到之后不会立马关闭连接,而是等待未完成的同步请求返回之后才会关闭连接,但是对于参数回调方法,客户端会立马断开连接,最后服务端会在进程关闭之前,回调客户端,但是客户端已经将连接断开
--
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] Graceful shutdown issue [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1865592411
> 停机开始,到停机完成, 停机开始前进入的请求可以返回,(自测了能快速响应的接口,阻塞的没测) 停机开始后,会拒绝新的请求 超时时间内能够处理的请求会返回---这个我没测
>
> 我理解就是dubbo的优雅停机,就是一方面拒绝新的请求,一方面,可以设置一个超时时间,以这个时间为上限,处理没有完成的请求,
有测试参数回调方法吗,同步和异步方法我测试了都没问题,参数回调方法我测试了都不行
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863864541
> 只会等待正在调用的服务结束,不会回调,---我的理解
拿异步的方法能正常完成嘛,客户端调用异步方法,服务端停机之后,这个异步方法能正常获取结果嘛
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "chrissun951 (via GitHub)" <gi...@apache.org>.
chrissun951 commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1864225890
停机开始,到停机完成,
停机开始前进入的请求可以返回,(自测了能快速响应的接口,阻塞的没测)
停机开始后,会拒绝新的请求
超时时间内能够处理的请求会返回---这个我没测
我理解就是dubbo的优雅停机,就是一方面拒绝新的请求,一方面,可以设置一个超时时间,以这个时间为上限,处理没有完成的请求,
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1868942390
Call back invocation is connection based.
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1867145758
Call back invocation is happend when server push something back to the client and graceful shutdown is for shutting down server. So you should try to let your server not push anything first. If you want to shutdown client, there is no way to make it graceful or you may try triple with streaming mode.
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1868942152
> > Call back invocation is happend when server push something back to the client and graceful shutdown is for shutting down server. So you should try to let your server not push anything first. If you want to shutdown client, there is no way to make it graceful or you may try triple with streaming mode.
>
> 是不是说参数回调不支持优雅停机,就是有一些业务场景需要服务端回调客户端,我发现服务端停机之后,会将停机之前已经接受到的请求执行完然后回调客户端,但是因为客户端提前就将连接中断了,导致服务端回调抛中断异常。
Yes
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "chrissun951 (via GitHub)" <gi...@apache.org>.
chrissun951 commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863829069
你的意思是,当消费端调用一个服务过程中,服务端发生故障(比如停机),provider停机前要回调通知消费端吗?
dubbo 对优雅停机的设计
https://cn.dubbo.apache.org/zh-cn/blog/2018/08/14/dubbo-%e4%bc%98%e9%9b%85%e5%81%9c%e6%9c%ba/
```
优雅停机是指在停止应用时,执行的一系列保证应用正常关闭的操作。这些操作往往包括等待已有请求执行完成、关闭线程、关闭连接和释放资源等,优雅停机可以避免非正常关闭程序可能造成数据异常或丢失,应用异常等问题。优雅停机本质上是JVM即将关闭前执行的一些额外的处理代码。
```
只会等待正在调用的服务结束,不会回调,---我的理解
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1865383934
1. You can use qos to offline before you shutdown. This can unregister provider on registry.
2. Try upgrade to 3.2.x. This has been improved.
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863762703
这段代码应该是优雅停机的实现,但是对于参数回调方法好像不支持,因为参数回调方法,首先是客户端调用服务端,服务端随后再主动调用客户端。
// graceful close
@Override
public void close(int timeout) {
if (closed) {
return;
}
closed = true;
if (timeout > 0) {
long start = System.currentTimeMillis();
while (DefaultFuture.hasFuture(channel)
&& System.currentTimeMillis() - start < timeout) {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
logger.warn(e.getMessage(), e);
}
}
}
close();
}
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863763883
> > 有日志吗? 另外,停止服务是方式是?
>
> 我想知道2.7.5版本支不支持参数回调方法的优雅停机,对于同步方法,服务端停机时,客户端感知到之后不会立马关闭连接,而是等待未完成的同步请求返回之后才会关闭连接,但是对于参数回调方法,客户端会立马断开连接,最后服务端会在进程关闭之前,回调客户端,但是客户端已经将连接断开
停机就是我服务重启
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1868942313
Call back invocation is connection based.
--
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] dubbo2.7.5 参数回调,provider停机之后,没有回调客户端,导致客户端大量超时。 [dubbo]
Posted by "chrissun951 (via GitHub)" <gi...@apache.org>.
chrissun951 commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863082058
有日志吗?
另外,停止服务是方式是?
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1987697960
No news is good news. Please feel free to create a new issue if you have any question.
--
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] Graceful shutdown issue [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1868301243
> Call back invocation is happend when server push something back to the client and graceful shutdown is for shutting down server. So you should try to let your server not push anything first. If you want to shutdown client, there is no way to make it graceful or you may try triple with streaming mode.
是不是说参数回调不支持优雅停机,就是有一些业务场景需要服务端回调客户端,我发现服务端停机之后,会将停机之前已经接受到的请求执行完然后回调客户端,但是因为客户端提前就将连接中断了,导致服务端回调抛中断异常。
--
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] Graceful shutdown issue [dubbo]
Posted by "nulinuli-nuli (via GitHub)" <gi...@apache.org>.
nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1865598392
> 1. You can use qos to offline before you shutdown. This can unregister provider on registry.
> 2. Try upgrade to 3.2.x. This has been improved.
1.再下线那一刻,服务端下线之前未完成的请求,能够再下线后回调客户端嘛,使用qos下线与服务直接重启有什么区别呢。
2.3.2版本解决了参数回调方法不能优雅停机嘛
--
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] Graceful shutdown issue [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #13539: Graceful shutdown issue
URL: https://github.com/apache/dubbo/issues/13539
--
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