gsr
10/17/2022, 3:19 PMcflock timeout="10" scope="Session" type="Exclusive">
<CFPARAM NAME="Session.loginid" DEFAULT=0>
</cflock>
i check some tutorials and getting a very vague answer, some say do not use it, some say names should be used instead of scope, so not sure ho can i fix itMyka Forrest
10/17/2022, 3:36 PMRodney
10/17/2022, 3:42 PMAdam Cameron
<cfparam>
calls that it can't get through them all in 10sec. Which is... unlikely.
I don't think you need that lock there btw... no race condition to be had in any meaningful way.
However as per my advice to someone a few weeks back... I'd not be writing to the session scope directly at all in my application code... I'd have it in a SessionAdapter or something. Probs not something that can be done for this specific issue though.
So anyway... same old gig... explain yer question better, post errors, show the reading you've done, what troubleshooting you've tried etc.gsr
10/17/2022, 6:29 PMgsr
10/17/2022, 6:29 PMgsr
10/17/2022, 6:30 PMRodney
10/17/2022, 6:30 PMAdam Cameron
onSessionStart
as a matter of design anyhow (obvs no help to Gavy here).
Gavy you need to bear in mind that where you are seeing the error is not necessarily what's causing the error. If you have
lock scope="session" type="exclusive" timeout="30" {
sleep(29000)
}
Then you'll get your timeout error in the code you mentioned, but it's caused by the long-running code above, which will keep the session scope locked for 29sec.gsr
10/17/2022, 7:55 PMcfvonner
10/17/2022, 8:09 PMcfvonner
10/17/2022, 8:10 PMgsr
10/17/2022, 8:35 PMAdam Cameron
Adam Cameron
Adam Cameron
include arguments[1]
at the end of it wouldn't do exactly the same thing?
Then you can take time to separate-out the application/session/request/error stuff out into their own handlers when you have time.gsr
10/18/2022, 12:36 AMAdam Cameron
I wonder i see the session check is in header file so I think I can use javascript to check the sessionI recommend you don't start thinking about the solution to an issue until you identify the problem. Also: I can't see how JS is going to solve an issue with your CFML sessions.
Adam Cameron
that answer is last resort because website is too big and it needs tons of approval before we actually do thatThe problem with this attitude is that your app (and your job) is gonna die a death of 1000 cuts. If the solution to the problem is acknowledging "we used now-obsolete technology before, and this has now come back to bite us on the bum. To solve this issue we need to suck it up and address it". Tell yer boss (or whoever is the blocker here) "to fix this we need to do some trivial re-acrchitecture of the application lifecycle. The mis-handling of this is what's causing this problem". It's your decision, not theirs. Application.cfc replaced Application.cfm as the way application lifecycle ought to be managed 15 years ago, btw. It's not like we're suggesting using something from CF2024-beta.
Evil Ware
10/19/2022, 12:50 PMgsr
10/19/2022, 1:04 PMgsr
10/19/2022, 1:05 PMEvil Ware
10/19/2022, 1:09 PMgsr
10/19/2022, 1:11 PMAdam Cameron
Evil Ware
10/19/2022, 3:22 PMgsr
10/19/2022, 3:55 PMgsr
10/19/2022, 4:00 PMEvil Ware
10/19/2022, 4:06 PM