Solved

fopen and _lopen delay when opening a network file after a 15 minute idle period

Posted on 2004-09-17
4
327 Views
Last Modified: 2013-12-03
Our application needs to open files across a network, using fopen and _lopen calls.  Normally this is not a problem, but at our most recent installation site, we are experiencing a 6 second delay when executing an fopen or _lopen call to a network file.  Subsequent calls made immediately to fopen and _lopen execute without a delay, however if we wait for 15 minutes, the 6 second delay re-appears.

Other than this issue, normal networking functions at this site are within acceptable limits.

We are using Windows XP on the client workstation, and Windows 2000 on the file server.

An example of our call is:

fopen("\\192.168.1.100\bwclass\151\test.fil","rb");
0
Comment
Question by:johnjbarryjr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:mxjijo
ID: 12089327

I guess you need to narrow down the problem.

You should find out

1) Where exactly the delay happens
    a) Winthin requesting machine ?
    b) Network ?
    c) Machine at the other end

There could ne several reasons causing it. Network delay, disk usage etc.

I think you should run a few tools to figure this out.

Let me call the requesting machine as the client and the other machine server.

1) Run FileMon.exe (sysinternals.com) and a packet sniffer (ethereal.exe or similar) on the client side and find out if the there is a delay between the API call and the request packet being placed on the network.

2) At the same time run TDIMon.exe (sysinternals.com) on the serverside and find out if there is a network delay.

3) Again, Run FileMon.exe at the server side and see if there is a delay in disk access and/or sending the data back

Sounds a little messy, but without knowing which side causing the delay its hard to fix it.

Since you have 6 sec delay, you can easily observe the delay.
I would say start with Filemon.exe running on both sides and you can roughly see where the delay is.



0
 
LVL 86

Expert Comment

by:jkr
ID: 12091716
I assume this is a problem regarding the caching of credentials on the server. After 15min idle, the clients' CRTs need to re-aithenticate aain, causing that delay.
0
 

Author Comment

by:johnjbarryjr
ID: 12101903
jkr:  If this is the case, is there anyway to speed this up, or keep it from timing out?
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 12102660
Hum, the easiest way (without fiddling with any registry or protocol settings) might be to issue an 'stat()' call in maybe 5min intervals to keep the connection "alive".
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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