Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: locatesession record contention

$
0
0
Re: locatesession record contention
Web Connection 5.0
Re: locatesession record contention
03/03/2012
01:36:12 PM
3G30T5PRZ Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None
Hi Michael,

Code like the replace x with x is required to ensure that you see the latest value from other sessions. It's really a VFP issue to ensure that you're getting the latest data from a table/cursor that isn't cached by VFP. I know of no other way for VFP to forceably refresh its buffers short of running a really short SET REFRESH TO value which will bring your app to a crawl. This is important for async AJAX calls, iFrame/Frames content etc that might be happening in multiple sessions 'simultaneously'.

I run with SET REPROCESS TO 2 SECONDS and haven't seen any issues with that but I don't think that's the issue here. The issue is that you have many clients updating the session table simultaneously I'm guessing. It's pretty hard to make happen I'd think unless you have bunch of instances running possibly across several machines. How many instances?

The right solution for this might be to use SQL Server sessions instead of VFP for this...

+++ Rick ---



In wwSession.LocateSession we have:

** Force table buffers to refresh Replace SessionId with SessionId

On a busy site (6 COM instances) I'm seeing a lot of "Record is in use by another user" errors in the error log and on screen. It's being hit by a call to 'IsValidSession'

There is some old code that may have set reprocess so I have bracketed that code to reset reprocess so I hope that resolves the issue.

Is there another way to force the refresh without locking the session record?
What should REPROCESS be set at to prevent contention?
Any other settings that might help?



Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii

Viewing all articles
Browse latest Browse all 10393

Trending Articles