Solved

Method to time an unresponsive exe

Posted on 2012-04-09
5
267 Views
Last Modified: 2012-06-02
Dear Experts.
I have a vb6 application that uses web service calls. Occasionally, on various systems, this app will become non-responsive. It never recovers and user must kill in Task Manager and restart.

I'd like to find an external service/product that initiates time at the beginning of the service call, and tracks how much time it takes until service responds. If a threshold is exceeded, I'd like the external timer to alert user and offer an 'abort' option on the service call.

I'm willing to build my own but am not sure of the best method. Samples would be welcome.

Thank you
klheitz
0
Comment
Question by:klheitz
  • 2
5 Comments
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
Could you show your web service call code please?
0
 

Author Comment

by:klheitz
Comment Utility
Hi MartinLiss ~
The plot thickens:

After more analysis I've found the hang must be happening w/n the exe (vs. w/ the service call). I write out a data file directly before calling the service and have found the offending line was not in that file.

This indicates the hang happens before ever getting to that point.

This changes my request to a service/method that can ID which routine my .exe is hanging in. I have error processing thru out the exe to output errors as well as send up a prompt on errors ~ but this appears to be some kind of infinite loop.

It doesn't happen consistently or on any given usage; and (just to complicate things) seems only to happen on systems using the service calls ~ one other potential clue is when a given system hangs, it is when the services/online d/b are being hit by multiple systems.

I'm wondering if it is somehow related to CPU or memory usage - and if there's any way I can track - and possibly circumvent - perhaps some way to tell my exe to wait til there's a certain amount of CPU or mem free before continuing (?).

I've attached a sample of my service call codes w/ some add'l information in a .doc if you find them useful.

Thanks for you help!
ServiceCall.doc
0
 
LVL 15

Accepted Solution

by:
eemit earned 500 total points
Comment Utility
Hi klheitz,
MSXML2.XMLHTTP does not support timeouts.
You can try some workarounds e.g.:
MSXML2.XMLHTTP with a TimeOut Value

Try to use:
Msxml2.ServerXMLHTTP, winhttp.dll, wininet.dll or winsock API-s instead
0
 
LVL 15

Expert Comment

by:eemit
Comment Utility
Hi klheitz,
Was this helpful?
Do you need more information or help?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now