-
Notifications
You must be signed in to change notification settings - Fork 449
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
如果连接时抛出 SslHandshakeTimeoutException 异常,那么 ApnsChannelPool pendingCreateChannelFutures 会一直被占有 #1060
Comments
This does sound like a bug, and I will investigate the issue. (via Google Translate):
|
@learnmore8 do you have a full stack trace from a
|
非常感谢您的回复和关注,以下是我的初始化代码和报错信息。
|
@learnmore8 Thank you for the additional details. This is helpful. I'm confused, though. We assemble the pipeline here: pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsChannelFactory.java Lines 135 to 143 in e88d498
pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsClientHandler.java Lines 528 to 532 in e88d498
…and regardless of how that promise resolves, pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsChannelPool.java Lines 146 to 147 in e88d498
So, considering all of that, it's not clear to me how we could be using all of the capacity in
…I think that should already be happening. Can you please say more about how you know that Also, what version of Pushy are you using? 感谢您提供更多详细信息。 这很有帮助。 不过我很困惑。 我们在这里组装管道: pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsChannelFactory.java Lines 135 to 143 in e88d498
pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsClientHandler.java Lines 528 to 532 in e88d498
...并且无论该承诺如何解决,“ApnsChannelPool”一旦完成都会从“pendingCreateChannelFutures”中删除“Promise”: pushy/pushy/src/main/java/com/eatthepath/pushy/apns/ApnsChannelPool.java Lines 146 to 147 in e88d498
因此,考虑到所有这些,我不清楚我们如何使用“pendingCreateChannelFutures”中的所有容量。 回到你原来的问题:
…我认为这应该已经发生了。 您能否详细说明一下您如何知道“pendingCreateChannelFutures”已填满? 另外,您使用的是哪个版本的 Pushy? |
Re-reading your example:
…I think your point may be that this specific handshake failure is being reported as a user event rather than thrown as an exception. That strikes me as strange, but I will review Netty's 重新阅读你的例子:
…我认为您的观点可能是,这种特定的握手失败被报告为用户事件,而不是作为异常抛出。 这让我觉得很奇怪,但我将回顾 Netty 的“SslHandler”代码,看看我是否可以更好地理解这种情况下发生的情况。 |
触发
但上面这个异常并不会触发
我使用的版本是:pushy 0.14.1 和 netty 4.1.92.Final 谢谢作者的回复,经过您的指导,我调整了修复方式,可以直接使用如下代码
|
@learnmore8 I apologize for the delay in getting back to this. I've written a test to try to demonstrate the behavior you've described, and I'm still not able to reproduce the specific result where connection attempts get "stuck" in What I'm observing is:
That left me confused at first, but then you pointed out that you're using 0.14.1. I believe the issue you're describing is a specific symptom of #853, which was fixed in #854. I believe this issue is a duplicate, and you can solve the problem by updating to the latest version of Pushy. With that in mind, I'm going to close this issue for now. If updating to the latest version does not solve your problem, please leave a comment here and I'll happily reopen the issue. @learnmore8 对于延迟回到这个话题我深表歉意。 我已经编写了一个测试来尝试演示您所描述的行为,但我仍然无法重现连接尝试在“pendingCreateChannelFutures”中“卡住”的具体结果。 请在 https://github.com/jchambers/pushy/compare/tls_handshake_timeout 中找到测试用例。 我观察到的是:
一开始这让我很困惑,但后来你指出你正在使用 0.14.1。 我相信您描述的问题是 #853 的特定症状,已在 #854 中修复。 我相信这个问题是重复的,您可以通过更新到最新版本的 Pushy 来解决该问题。 考虑到这一点,我现在将关闭这个问题。 如果更新到最新版本_不能_解决您的问题,请在此处发表评论,我很乐意重新打开该问题。 |
我的 Java 程序通过 Nginx 做代理访问 Apns,代理层偶现会出现 DNS 解析超时,然而这个超时会导致 ApnsChannelPool pendingCreateChannelFutures 没有 remove channel,最终导致 pendingCreateChannelFutures 的数量等于 capacity,从而没有任何一个可用的 connection 发送数据。
如果 Pushy 收到 SslHandshakeTimeoutException 是否应该把这个已经关闭的 channel 从 pendingCreateChannelFutures 移除呢?
(edited by @jchambers to add, via Google Translate):
The text was updated successfully, but these errors were encountered: