C# application keeps freezing on remote

喜欢而已 提交于 2019-12-04 03:49:31

I do not think the freeze has anything to do with remote desktop. Adding logging was a good suggestion. I have a few suggestions, but without knowing the details of you application I can't get too specific.

The simplest suggestion I have is to check the memory useage and CPU usage in task manager when the freeze occurs.

If adding detailed logging is not an option, add just enough logging to know WHEN the application freezes. This could simply be a thread in the application which writes a timestamp to a file once a minute. Then you can see if there is any pattern in when it freezes, such as after a user has logged off, or when some of the data which you are monitoring changes, or at a certain time each day, or after being online for a certain amount of time.

A final and very hacky solution is to write a small watch dog application. This application's only job is to periodically check on the main application to make sure it is still responsive. How you dow this various drastically based on what your application does. If the watchdog sees the the main application has stopped, it can kill the thread for the main application and re-start it from the binaries.

if your using application streaming your server could be slowing the connection or waiting for packets that are dropping this can create this if your physical using windows remote desktop then there is your problem intense applications are not supposed to be run though remote desktop

AFAIK, there is no difference. Additionaly, I never experienced such a problem. I suggest, you try the following:

  • Extend your application with extended logging, to see what the users are doing when your application freezes
  • Check the network connection that is used to connect to the remote machine
  • Check the CPU usage during the freeze

If the freeze is for an extended amount of time, try to do the following:

  • Reproduce the freeze via remote desktop.
  • Go to the machine you just reproduced the freeze on and log in directly and see, whether the application is still freezed
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!