Hey guys, I am having a problem that is very mysterious and I would like some advice as to how I should go about debugging it.
So I have a program that basically reads live stock prices, stores them and performs calculations on them and then outputs calculated values. There are multiple threads of execution in this application. I subscribe to prices using software that our company develops that uses a socket connection to a price server. The application works great and then about 5-60 minutes in, the subscription to prices gets dropped. No exception is thrown, there is no output or anything. Simply the prices start coming in. I wrote a very simple application that just prints out the prices as they come in, and ran both applications. The simple one works fine while my application stops getting prices. Both are windows forms apps, and the app that stops getting prices, is still alive, there are just no new updates to the GUI. I am completely baffled as to how to debug/troubleshoot this issue. I have tried waiting for the freeze, performing a break-all in Visual Studio, and examining the threads, but I cannot tell anything. I have no idea where or when the error is taking place, and the only way that I can tell is by seeing new prices on the other app, and not on the malfunctioning app. The API through which I am getting prices provides no way to check if my subscription is healthy or not. I have a button that simply resubscribes to prices, and when the price subscription drops, I can just click that button and everything works fine. Could this be a threading problem? Or is it more likely that it is something else? I have monitored CPU/Memory/Network usage and everything is running fine. What are the conditions under which a TCP socket connection will be dropped? What are is the most probable cause of this problem and is there any way I can easily use Visual Studio to pinpoint the issue? Thanks a lot, -Jeff
