应用程序保持空闲一段时间(2-4小时)后套接字连接中断 [英] Socket connection breaking after the application remains idle for sometime(2-4hours)

查看:66
本文介绍了应用程序保持空闲一段时间(2-4小时)后套接字连接中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Windows窗体应用程序,它使用套接字通信与后端UNIX服务器进行通信。

We have a windows form application and it communicates to a backend UNIX server using socket communication.

应用程序用户正面临一个奇怪的问题。如果应用程序闲置一段时间(2-4小时),应用程序将断开套接字并验证日志,我们会看到以下错误。

Some of the application users are facing a strange problem. If the application is left idle for some time(2-4 hours), the application disconnects the socket and by verifying the logs, we see following errors.

"现有连接被强制执行由远程主机关闭"。

"An existing connection was forcibly closed by the remote host".

 

我没有在Windows窗体中看到任何表明存在时间间隔的编码如果我让我的应用程序闲置24小时,它将打破套接字并且它可以正常工作。

I do not see any coding in the Windows form that suggests that there is a time interval after which it will break the sockets and it works perfectly fine if I keep my application idle for 24 hours.

我已经验证用户PC和服务器之间没有防火墙他正在联系。我应该验证其他原因/区域吗?

I have already verified that there is no firewall between the user PC and the server to which he is connecting to. Is there any other reason/area I should verify?

 

 

推荐答案

如果连接太多,您的服务器套接字可能会停止 
working。


这篇关于应用程序保持空闲一段时间(2-4小时)后套接字连接中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆