mysql 空闲连接 断开
When you administrate servers running Windows Server 2000 or 2003, one of the most frustrating experiences is when sessions get cut off but the server still thinks they are active. You’ll get this error message, which you are sure to encounter at some point:
管理运行Windows Server 2000或2003的服务器时,最令人沮丧的体验之一是会话中断,但服务器仍认为它们处于活动状态。 您将收到此错误消息,您一定会遇到此错误消息:
The terminal server has exceeded the maximum number of allowed connections.
终端服务器已超过允许的最大连接数。
You can help prevent this from happening by setting a policy on the server to automatically disconnect when idle.
您可以通过在服务器上设置一个策略以在空闲时自动断开连接来帮助防止这种情况的发生。
To change this setting, go to Administrative Tools \ Terminal Services Configuration.
若要更改此设置,请转到“管理工具” \“终端服务配置”。
Click on Connections in the left hand pane, and then right click RDP-Tcp and select Properties. In the resulting window select the Sessions tab.
单击左侧窗格中的“连接”,然后右键单击RDP-Tcp并选择“属性”。 在出现的窗口中,选择“会话”选项卡。
Check the boxes for “Override user settings” and change the idle session limit to something reasonable, like an hour. You can set it lower if you’d like.
选中“覆盖用户设置”框,然后将空闲会话限制更改为合理的值,例如一个小时。 您可以根据需要将其设置得较低。
Change the radio button to “Disconnect from session” when session limit is reached. This will make all sessions automatically mark as disconnected on the server. The session will be saved exactly as it was, but the server will mark it as disconnected so that you can log back into the session again.
当达到会话限制时,将单选按钮更改为“从会话断开连接”。 这将使所有会话在服务器上自动标记为已断开连接。 该会话将被保存为原样,但是服务器会将其标记为已断开连接,以便您可以再次登录该会话。
翻译自: https://www.howtogeek.com/howto/windows/force-terminal-services-clients-to-disconnect-when-idle/
mysql 空闲连接 断开