Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Frank Cazabon
  Where is Frank Cazabon?
 
 Trinidad And Tobago
 Frank Cazabon
 To: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 Tags
Subject: RE: System hangs when other PC connects
Thread ID: 311089 Message ID: 311212 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Errors & Debugging
Date: Wednesday, June 29, 2011 5:55:19 PM         
   


> >
> > I have disabled SMB2 on all PCs involved and so far this seems to have fixed the problem, but the user will monitor it today and report back.
> >
> > Frank.
> >
> > Frank Cazabon
> > Samaan Systems Ltd.
> > www.SamaanSystems.com
>
> You describe the classic opportunistic locking OPLOCKS scenario. I got to play with this at a client extensively. I had 4 PCs to play with and a Windows Server 2008. If the first pc (with the data files) is accessing the tables via a mapped drive or UNC, it basically gets exclusive access - Windows "prefers" this, thinking that a user is opening a Word or Excel document on the server. Once the second machine accesses the file, the first machine must dump all caches and change to shared access. Time-consuming with ll the caching VFP does. If machines 2 and 3 were to access machine one at the same time, both 2 and 3 will wait while machine one switches. If the first machine is not using a drive map or UNC, it uses the files without involving SMB2. However, if machine 2 started the app first, and machine one then accesses using UNC or mapping, it will experience the same delay. If it is not using UNC or mapping, I bet it will still have to wait, but I'm not sure. Never thought to check that.
>
> Definitely disable oplocks everywhere. Disable write caching too. Share any MS documentation with their IT people. It's all fine and dandy with single user files, but it's not fine for shared access files. Obviously, none of this is an issue with a SQL Server database. Makes me wonder about SQL Express. That is Access isn't it? Is a "server" installed because that would by-pass oplocks.
>
> I also hope that machine one is the "administrator" of your application and not using UNC/mapping. That way a reindex can be lightning fast.
>
> Mike Yearwood
> Microsoft MVP Visual FoxPro 2008, 2009
> We have enough youth. We need a fountain of smart!
> There may be many ways to skin a cat, but there are very few right ways to do it.

Hi Mike,

I'm not sure my scenario fits this perfectly.

PC1 is the "server" running Windows 7 Ultimate 32 bit and with the files shared in its public documents. This PC always started and ran fine, no matter what other PC was running.

PC2 is a Windows vista Ultimate 32 bit client. It "hung" whenever PC1 had the application open, but ran fine if PC3 had it open.

PC3 is a Windows Vista Ultimate 32 bit client. It ran fine in all scenarios, even if PC1 was running the app.

I tend not to mess with the Oplocks unless things are slow which is not the case here now that SMB2 has been disabled.

SQL Express is a server and is not affected by SMB2.

Frank.

Frank Cazabon
Samaan Systems Ltd.
www.SamaanSystems.com

ENTIRE THREAD

System hangs when other PC connects Posted by Frank Cazabon @ 6/28/2011 6:51:38 PM
RE: System hangs when other PC connects Posted by Yahia Aboudalal @ 6/29/2011 9:54:04 AM
RE: System hangs when other PC connects Posted by Frank Cazabon @ 6/29/2011 1:55:27 PM
RE: System hangs when other PC connects Posted by Frank Cazabon @ 6/29/2011 3:07:34 PM
RE: System hangs when other PC connects Posted by Mike Yearwood @ 6/29/2011 4:20:55 PM
RE: System hangs when other PC connects Posted by Frank Cazabon @ 6/29/2011 5:55:19 PM