Solved

Method to time an unresponsive exe

Posted on 2012-04-09
5
270 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 46

Expert Comment

by:Martin Liss
ID: 37828256
Could you show your web service call code please?
0
 

Author Comment

by:klheitz
ID: 37828474
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
ID: 37830564
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
ID: 38025222
Hi klheitz,
Was this helpful?
Do you need more information or help?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
index Out OF Range Exception error 4 54
Add and format columns in vb6 7 47
c++ reading data from file into two dimensional array 3 96
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 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