RE: WHYYYYY!!!!!!

2002-09-24 Thread Dave Watts

  What I do know is that if you don't lock memory 
  variables in CF 5 or earlier, your server will 
  typically crash under load, and if you consistently 
  lock memory variables with the SCOPE attribute, your
  server won't crash under load.

 I agree that empirical testing is the way to go, but I 
 disagree with your must lock memory variables rule. 
 There are many applications that can avoid the use of 
 cflock even in pre-MX days. IMHO, adding additional
 overhead when none is needed is foolish.

Some foolishness is less foolish than other foolishness.

In my defense, I'd like to point out the use of the word typically in the
first paragraph above. Sure, there are exceptional cases, but I would argue
that they are, in fact, exceptional cases.

I've had to fix a lot of broken applications, in which the cause of the
problem was the failure to lock memory variables. Given that, I'd prefer to
see everyone incur a little unnecessary overhead rather than risk total
system failure. Sure, if you really know what you're doing, you might be
able to avoid locking in some situations, but I really think that figuring
out whether you've got such a situation is more trouble than it's worth,
when the overhead is pretty minimal and the cost of failure is so high. If
you really know what you're doing, and you're willing to do the
above-mentioned empirical testing to make sure (before letting your users do
that testing for you), then whatever works for you is the right way to go.
Many people using CF don't fall into both of those categories, though, and
in that case, safe is better than sorry.

As you've pointed out more than once, true scalability isn't a matter of
code optimization, right?

By the way, welcome to Atlanta!

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-24 Thread Tony Weeg

dave,

is that, welcome to atlanta where the playa's play?

:) I had to!

..tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337 


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 24, 2002 9:40 AM
To: CF-Talk
Subject: RE: WHY!!


  What I do know is that if you don't lock memory 
  variables in CF 5 or earlier, your server will 
  typically crash under load, and if you consistently 
  lock memory variables with the SCOPE attribute, your
  server won't crash under load.

 I agree that empirical testing is the way to go, but I 
 disagree with your must lock memory variables rule. 
 There are many applications that can avoid the use of 
 cflock even in pre-MX days. IMHO, adding additional
 overhead when none is needed is foolish.

Some foolishness is less foolish than other foolishness.

In my defense, I'd like to point out the use of the word typically in
the
first paragraph above. Sure, there are exceptional cases, but I would
argue
that they are, in fact, exceptional cases.

I've had to fix a lot of broken applications, in which the cause of the
problem was the failure to lock memory variables. Given that, I'd prefer
to
see everyone incur a little unnecessary overhead rather than risk total
system failure. Sure, if you really know what you're doing, you might be
able to avoid locking in some situations, but I really think that
figuring
out whether you've got such a situation is more trouble than it's worth,
when the overhead is pretty minimal and the cost of failure is so high.
If
you really know what you're doing, and you're willing to do the
above-mentioned empirical testing to make sure (before letting your
users do
that testing for you), then whatever works for you is the right way to
go.
Many people using CF don't fall into both of those categories, though,
and
in that case, safe is better than sorry.

As you've pointed out more than once, true scalability isn't a matter of
code optimization, right?

By the way, welcome to Atlanta!

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread S . Isaac Dealey

 no, but ill try that.

 +++ im trying now. ++

 not lookin good...its a shared server
 environment, experthost.com. can they block
 locking capabilities?

No, they can't disable the cflock tag...

 i havent used locks on session vars, havent
 needed to, and having never formally learned
 cf, not really 100% down with the thought
 process behind locking session var setting...

 any good books on that topic?

Not whole books, but there's a really good article on www.depressedpress.com
Depending on who you talk to, cflock was either a feature or a kludge to
overcome a weakness in versions of the cf-server prior to MX. The issue goes
something like this: variable session.x is available to a given person at
any point during a session, however, multiple pages or processes may attempt
to read/write session.x more or less simultaneously ( this happens more
often with frames because they're loading at the same time, thus creating a
tighter race condition ). So what happens if page x is trying to set
session.x while page y is trying to read session.y or worse, 2 pages are
trying to set it at the same time? If you're lucky nothing especially
horrible. Often it may cause the memory where session.x is stored to become
corrupted, resulting in bad pointers, etc. wherein person x is provided with
the session.x variable from person y's session or worse, the whole server
just takes a nose dive because it doesn't know what's what in it's volatile
memory.

 +

 now back to the issueits the setting
 of the cookie var that is buggin

 now, the interesting part, is that this is
 the setting of a cookie var called FinalRegisteredLive
 which is already set, however now it needs
 to be set with new data contained in it, am i
 seeing that i have to make the value of it (nothing)
 and then, reset it to a new value? or shouldnt
 i be able to rewrite the value with the cfset?

Yea, I'd try using cfset cookie.x = blah and see if that helps any ...

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Tony Weeg

my man, My Man!
thank you dave.

that's probably the funniest thing I have read this morning
and the most informative email I have gotten in a long time
in regards to locking (kinda wish I'd made it to the locking
session last year @ devcon)

but anyway, it makes sense, plain and well done.

thank you!

ps...i implemented this into my code @ my office @ my real
job this morning, and things are humming along

now, I guess my next question would be, is the cflock timeout
sort of an arbitrary guess as to what would be a good amount of time?
I mean, how long are the lock timeouts on the heaviest hit
cf pages set for? whats a good number?

..tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337 


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 23, 2002 1:52 AM
To: CF-Talk
Subject: RE: WHY!!


 i havent used locks on session vars, havent
 needed to, and having never formally learned
 cf, not really 100% down with the thought
 process behind locking session var setting...

The thought process is very simple. If you're running CF 5 or earlier,
and
you're using session variables, and you don't lock them, bad things will
happen. Memory variables can be accessed by concurrent requests, and CF
doesn't handle that well, by default. While you might not think session
variables would be used by concurrent requests, there are many possible
cases in which more than one request from the same user might be running
concurrently.

 any good books on that topic?

A book would be overkill, just for this topic. If you're using CF 5 or
earlier, just follow these simple rules:

1. Dvery time you put Session, Application or Server in your code,
use
CFLOCK around it.

2. If you're using any version of CF which supports the SCOPE attribute
(4.5+, I think), use that with your CFLOCK tags around memory variables.

3. If you're reading a memory variable, use TYPE=READONLY in your
CFLOCK;
if you may change the variable's value, use TYPE=EXCLUSIVE.

4. There is no rule 4.

5. Reread rule 1.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Dave Watts

 now, I guess my next question would be, is the cflock 
 timeout sort of an arbitrary guess as to what would be 
 a good amount of time? I mean, how long are the lock 
 timeouts on the heaviest hit cf pages set for? whats 
 a good number?

42.

Seriously, the number will depend on what you're doing inside the lock, and
how critical it is to wait for that lock as opposed to cancelling the
request. Just remember that the timeout specifies how long CF will wait to
execute that lock, not how long it'll hold the lock. That is, if CF has to
wait because another request is using the lock, the timeout is how long CF
will wait.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Tony Weeg

yeah, I get that, but I guess what im looking for is something like...

1 cfset = wait for processing 1 sec.
1 cfset + 1 whatever = wait for proc. 2.5 secs.

are there any metrics or best practices for this?

..tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337 


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 23, 2002 10:35 AM
To: CF-Talk
Subject: RE: cflocking de-mystified (was RE: WHY!!)


 now, I guess my next question would be, is the cflock 
 timeout sort of an arbitrary guess as to what would be 
 a good amount of time? I mean, how long are the lock 
 timeouts on the heaviest hit cf pages set for? whats 
 a good number?

42.

Seriously, the number will depend on what you're doing inside the lock,
and
how critical it is to wait for that lock as opposed to cancelling the
request. Just remember that the timeout specifies how long CF will wait
to
execute that lock, not how long it'll hold the lock. That is, if CF has
to
wait because another request is using the lock, the timeout is how long
CF
will wait.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread jon hall

Locking has almost no performance penalty in and of itself, so there
is nothing to add to the amount of time the code being locked take to
process. 1 cfset is going to take almost no time at all, so you could
safely put the timeout at 1 second, because even if CF was totally
maxed on threads with 5, 10, or 20, etc pages executing at once, and
they all hit that one cfset at the same time, that cfset is still
probably going to execute faster than threads * processing time.

So as Dave said, it really depends on what is being done in the
lock. Personally I usually default to 5 seconds, even for 1 cfset. If
a 5 second lock it timing out, then I'm probably doing something wrong
in the first place.

-- 
 jon
 mailto:[EMAIL PROTECTED]

Monday, September 23, 2002, 10:32:35 AM, you wrote:
TW yeah, I get that, but I guess what im looking for is something like...

TW 1 cfset = wait for processing 1 sec.
TW 1 cfset + 1 whatever = wait for proc. 2.5 secs.

TW are there any metrics or best practices for this?

TW ..tony

TW Tony Weeg
TW Senior Web Developer
TW Information System Design
TW Navtrak, Inc.
TW Fleet Management Solutions
TW www.navtrak.net
TW 410.548.2337 


TW -Original Message-
TW From: Dave Watts [mailto:[EMAIL PROTECTED]] 
TW Sent: Monday, September 23, 2002 10:35 AM
TW To: CF-Talk
TW Subject: RE: cflocking de-mystified (was RE: WHY!!)


 now, I guess my next question would be, is the cflock 
 timeout sort of an arbitrary guess as to what would be 
 a good amount of time? I mean, how long are the lock 
 timeouts on the heaviest hit cf pages set for? whats 
 a good number?

TW 42.

TW Seriously, the number will depend on what you're doing inside the lock,
TW and
TW how critical it is to wait for that lock as opposed to cancelling the
TW request. Just remember that the timeout specifies how long CF will wait
TW to
TW execute that lock, not how long it'll hold the lock. That is, if CF has
TW to
TW wait because another request is using the lock, the timeout is how long
TW CF
TW will wait.

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Blum, Jason (SAA)

Maybe I can jump in on this thread with a related question - Dave and
others keep emphasizing that it isn't necessary to lock in MX.

I am using a large Application.Array for a number of values and strings
which I then loop through to output.  The array is being written to and
read from at least a dozen times a minute - I do this because I figured
it would be best to just keep it in memory given how frequently it gets
referenced.

But then I keep getting the same symptom - MX freezes up at 100% CPU
every four or five hours.  Plenty of memory and storage.

Again, not locking Application variables because I thought it was
unnecessary.

So,
1, is it in fact necessary in MX and
2, Is an Application.array the best place to store this kind of thing?

Thanks!

-Jason 




-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 23, 2002 1:52 AM
To: CF-Talk
Subject: RE: WHY!!

 i havent used locks on session vars, havent
 needed to, and having never formally learned
 cf, not really 100% down with the thought
 process behind locking session var setting...

The thought process is very simple. If you're running CF 5 or earlier,
and
you're using session variables, and you don't lock them, bad things will
happen. Memory variables can be accessed by concurrent requests, and CF
doesn't handle that well, by default. While you might not think session
variables would be used by concurrent requests, there are many possible
cases in which more than one request from the same user might be running
concurrently.

 any good books on that topic?

A book would be overkill, just for this topic. If you're using CF 5 or
earlier, just follow these simple rules:

1. Dvery time you put Session, Application or Server in your code,
use
CFLOCK around it.

2. If you're using any version of CF which supports the SCOPE attribute
(4.5+, I think), use that with your CFLOCK tags around memory variables.

3. If you're reading a memory variable, use TYPE=READONLY in your
CFLOCK;
if you may change the variable's value, use TYPE=EXCLUSIVE.

4. There is no rule 4.

5. Reread rule 1.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Jason Egan

Right - I use the name attribute for cflock rather than scope
(occasionally) because my understanding is that when you lock on the
scope you Lock the entire scope down for that transaction -- if you use
names, then they are all (potentially) unique and you won't have a
usually fast process waiting on a slow process - essentially denying
client access because of scope locking...

Jason
CFDynamics.com

 -Original Message-
 From: Tony Weeg [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 23, 2002 7:53 AM
 To: CF-Talk
 Subject: cflocking de-mystified (was RE: WHY!!)
 
 
 
 my man, My Man!
 thank you dave.
 
 that's probably the funniest thing I have read this morning
 and the most informative email I have gotten in a long time
 in regards to locking (kinda wish I'd made it to the locking 

 session last year @ devcon)
 
 but anyway, it makes sense, plain and well done.
 
 thank you!
 
 ps...i implemented this into my code @ my office @ my real
 job this morning, and things are humming along
 
 now, I guess my next question would be, is the cflock timeout 
 sort of an arbitrary guess as to what would be a good amount 
 of time? I mean, how long are the lock timeouts on the 
 heaviest hit cf pages set for? whats a good number?
 
 ...tony
 
 Tony Weeg
 Senior Web Developer
 Information System Design
 Navtrak, Inc.
 Fleet Management Solutions
 www.navtrak.net
 
 410.548.2337 
 
 
 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 23, 2002 1:52 AM
 To: CF-Talk
 Subject: RE: WHY!!
 
 
  i havent used locks on session vars, havent
  needed to, and having never formally learned
  cf, not really 100% down with the thought
  process behind locking session var setting...
 
 The thought process is very simple. If you're running CF 5 or 
 earlier, and you're using session variables, and you don't 
 lock them, bad things will happen. Memory variables can be 
 accessed by concurrent requests, and CF doesn't handle that 
 well, by default. While you might not think session variables 
 would be used by concurrent requests, there are many possible 
 cases in which more than one request from the same user might 
 be running concurrently.
 
  any good books on that topic?
 
 A book would be overkill, just for this topic. If you're 
 using CF 5 or earlier, just follow these simple rules:
 
 1. Dvery time you put Session, Application or Server in 
 your code, use CFLOCK around it.
 
 2. If you're using any version of CF which supports the SCOPE 
 attribute (4.5+, I think), use that with your CFLOCK tags 
 around memory variables.
 
 3. If you're reading a memory variable, use TYPE=READONLY 
 in your CFLOCK; if you may change the variable's value, use 
 TYPE=EXCLUSIVE.
 
 4. There is no rule 4.
 
 5. Reread rule 1.
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 voice: (202) 797-5496
 fax: (202) 797-5444
 
 : dream :: design :: develop :
 MXDC 02 :: Join us at this all day conference for 
 designers  developers to learn tips, tricks, best 
 practices and more for the entire Macromedia MX suite.
 
 September 28, 2002  ::  http://www.mxdc02.com/
 (Register today, seats are limited!)
 ::
 
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: RE: WHYYYYY!!!!!!

2002-09-23 Thread ksuh

You're probably having a race condition occurring.  Those still required locks.

- Original Message -
From: Blum, Jason (SAA) [EMAIL PROTECTED]
Date: Monday, September 23, 2002 11:06 am
Subject: RE: WHY!!

 Maybe I can jump in on this thread with a related question - Dave and
 others keep emphasizing that it isn't necessary to lock in MX.
 
 I am using a large Application.Array for a number of values and 
 stringswhich I then loop through to output.  The array is being 
 written to and
 read from at least a dozen times a minute - I do this because I 
 figuredit would be best to just keep it in memory given how 
 frequently it gets
 referenced.
 
 But then I keep getting the same symptom - MX freezes up at 100% CPU
 every four or five hours.  Plenty of memory and storage.
 
 Again, not locking Application variables because I thought it was
 unnecessary.
 
 So,
 1, is it in fact necessary in MX and
 2, Is an Application.array the best place to store this kind of thing?
 
 Thanks!
 
 -Jason 
 
 
 
 
 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 23, 2002 1:52 AM
 To: CF-Talk
 Subject: RE: WHY!!
 
  i havent used locks on session vars, havent
  needed to, and having never formally learned
  cf, not really 100% down with the thought
  process behind locking session var setting...
 
 The thought process is very simple. If you're running CF 5 or earlier,
 and
 you're using session variables, and you don't lock them, bad 
 things will
 happen. Memory variables can be accessed by concurrent requests, 
 and CF
 doesn't handle that well, by default. While you might not think 
 sessionvariables would be used by concurrent requests, there are 
 many possible
 cases in which more than one request from the same user might be 
 runningconcurrently.
 
  any good books on that topic?
 
 A book would be overkill, just for this topic. If you're using CF 
 5 or
 earlier, just follow these simple rules:
 
 1. Dvery time you put Session, Application or Server in your 
 code,use
 CFLOCK around it.
 
 2. If you're using any version of CF which supports the SCOPE 
 attribute(4.5+, I think), use that with your CFLOCK tags around 
 memory variables.
 
 3. If you're reading a memory variable, use TYPE=READONLY in your
 CFLOCK;
 if you may change the variable's value, use TYPE=EXCLUSIVE.
 
 4. There is no rule 4.
 
 5. Reread rule 1.
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 voice: (202) 797-5496
 fax: (202) 797-5444
 
 : dream :: design :: develop :
 MXDC 02 :: Join us at this all day conference for 
 designers  developers to learn tips, tricks, best 
 practices and more for the entire Macromedia MX suite.
 
 September 28, 2002  ::  http://www.mxdc02.com/
 (Register today, seats are limited!)
 ::
 
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Mark A. Kruger - CFG

While it's true you do not have to lock to prevent the old memory
corruption type problems, you will still have to lock to prevent race
conditions - and given your description of what you are doing, I'd lock
everytime you write to your array.

-mk

-Original Message-
From: Blum, Jason (SAA) [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 12:07 PM
To: CF-Talk
Subject: RE: WHY!!


Maybe I can jump in on this thread with a related question - Dave and
others keep emphasizing that it isn't necessary to lock in MX.

I am using a large Application.Array for a number of values and strings
which I then loop through to output.  The array is being written to and
read from at least a dozen times a minute - I do this because I figured
it would be best to just keep it in memory given how frequently it gets
referenced.

But then I keep getting the same symptom - MX freezes up at 100% CPU
every four or five hours.  Plenty of memory and storage.

Again, not locking Application variables because I thought it was
unnecessary.

So,
1, is it in fact necessary in MX and
2, Is an Application.array the best place to store this kind of thing?

Thanks!

-Jason




-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 1:52 AM
To: CF-Talk
Subject: RE: WHY!!

 i havent used locks on session vars, havent
 needed to, and having never formally learned
 cf, not really 100% down with the thought
 process behind locking session var setting...

The thought process is very simple. If you're running CF 5 or earlier,
and
you're using session variables, and you don't lock them, bad things will
happen. Memory variables can be accessed by concurrent requests, and CF
doesn't handle that well, by default. While you might not think session
variables would be used by concurrent requests, there are many possible
cases in which more than one request from the same user might be running
concurrently.

 any good books on that topic?

A book would be overkill, just for this topic. If you're using CF 5 or
earlier, just follow these simple rules:

1. Dvery time you put Session, Application or Server in your code,
use
CFLOCK around it.

2. If you're using any version of CF which supports the SCOPE attribute
(4.5+, I think), use that with your CFLOCK tags around memory variables.

3. If you're reading a memory variable, use TYPE=READONLY in your
CFLOCK;
if you may change the variable's value, use TYPE=EXCLUSIVE.

4. There is no rule 4.

5. Reread rule 1.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for
designers  developers to learn tips, tricks, best
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::



__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread S . Isaac Dealey

 The array is being written to and read from at least a dozen times a
minute

snip

 But then I keep getting the same symptom - MX freezes up at 100% CPU
 every four or five hours.  Plenty of memory and storage.

Entirely asside from MX and whether or not locking is necessary, if you have
2 pages where one checks for the existance of and sets a member of the array
and the second page checks for the existance of and removes it... Could be
that you get yourself into a chicken-egg scenario where two pages are
repeatedly coming up behind each other and modifying the array because of
the condition created by the other page modifying it, thus preventing
ColdFusion threads from being released... Especially if it's being modified
as frequently as you say, I'd give it a little thought. My brain can almost
see the situation in literal terms, but not quite -- I'd have to see more of
the array code to know if the idea has any merit given your setup.

Something else you might want to try -- append the time to a text file each
time the array is updated, just to be sure your metrics are correct and that
it is happening roughly once every 5 seconds and that there aren't
situations where there are overlapping updates as a result of a frameset,
etc...

hth

S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Smith, Matthew P -CONT(DYN)

But if you access two variables in the same scope(ie session) at the same
time because of different names, can't that cause corruption?

Also, readonly locks are simply pointers; the only time they are locked down
is during an exclusive lock as used during a write.

Matthew P. Smith 
Web Developer, Object Oriented 
Naval Education  Training Professional 
Development  Technology Center 
(NETPDTC) 
(850)452-1001 ext. 1245 
[EMAIL PROTECTED] 


-Original Message-
From: Jason Egan [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 12:06 PM
To: CF-Talk
Subject: RE: cflocking de-mystified (was RE: WHY!!)

Right - I use the name attribute for cflock rather than scope
(occasionally) because my understanding is that when you lock on the
scope you Lock the entire scope down for that transaction -- if you use
names, then they are all (potentially) unique and you won't have a
usually fast process waiting on a slow process - essentially denying
client access because of scope locking...

Jason
CFDynamics.com

 -Original Message-
 From: Tony Weeg [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 7:53 AM
 To: CF-Talk
 Subject: cflocking de-mystified (was RE: WHY!!)



 my man, My Man!
 thank you dave.

 that's probably the funniest thing I have read this morning
 and the most informative email I have gotten in a long time
 in regards to locking (kinda wish I'd made it to the locking

 session last year @ devcon)

 but anyway, it makes sense, plain and well done.

 thank you!

 ps...i implemented this into my code @ my office @ my real
 job this morning, and things are humming along

 now, I guess my next question would be, is the cflock timeout
 sort of an arbitrary guess as to what would be a good amount
 of time? I mean, how long are the lock timeouts on the
 heaviest hit cf pages set for? whats a good number?

 ...tony

 Tony Weeg
 Senior Web Developer
 Information System Design
 Navtrak, Inc.
 Fleet Management Solutions
 www.navtrak.net

 410.548.2337


 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 1:52 AM
 To: CF-Talk
 Subject: RE: WHY!!


  i havent used locks on session vars, havent
  needed to, and having never formally learned
  cf, not really 100% down with the thought
  process behind locking session var setting...

 The thought process is very simple. If you're running CF 5 or
 earlier, and you're using session variables, and you don't
 lock them, bad things will happen. Memory variables can be
 accessed by concurrent requests, and CF doesn't handle that
 well, by default. While you might not think session variables
 would be used by concurrent requests, there are many possible
 cases in which more than one request from the same user might
 be running concurrently.

  any good books on that topic?

 A book would be overkill, just for this topic. If you're
 using CF 5 or earlier, just follow these simple rules:

 1. Dvery time you put Session, Application or Server in
 your code, use CFLOCK around it.

 2. If you're using any version of CF which supports the SCOPE
 attribute (4.5+, I think), use that with your CFLOCK tags
 around memory variables.

 3. If you're reading a memory variable, use TYPE=READONLY
 in your CFLOCK; if you may change the variable's value, use
 TYPE=EXCLUSIVE.

 4. There is no rule 4.

 5. Reread rule 1.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 voice: (202) 797-5496
 fax: (202) 797-5444

 : dream :: design :: develop :
 MXDC 02 :: Join us at this all day conference for
 designers  developers to learn tips, tricks, best
 practices and more for the entire Macromedia MX suite.

 September 28, 2002  ::  http://www.mxdc02.com/
 (Register today, seats are limited!)
 ::




__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: WHYYYYY!!!!!!

2002-09-23 Thread Sharon DiOrio

 1, is it in fact necessary in MX and

It's pretty much necessary regardless of MX.

 2, Is an Application.array the best place to store this kind of thing?

That depends.  Is the information something that is shared across the
application and not something that changes frequently?  If so, absolutely.
I tend to copy these things (under locking) to Request scope for reading.
This way I don't have to have cflock's around large blocks of code.

Sharon
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Mark A. Kruger - CFG

I would add - do a copy (as in cfset myVar = duplicate(application.myvar)

If you just re-reference it to another scope (as in cfset myVar =
application.myvar ), you have not solved your problem

-mk

-Original Message-
From: Sharon DiOrio [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 2:29 PM
To: CF-Talk
Subject: Re: WHY!!


 1, is it in fact necessary in MX and

It's pretty much necessary regardless of MX.

 2, Is an Application.array the best place to store this kind of thing?

That depends.  Is the information something that is shared across the
application and not something that changes frequently?  If so, absolutely.
I tend to copy these things (under locking) to Request scope for reading.
This way I don't have to have cflock's around large blocks of code.

Sharon

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: WHYYYYY!!!!!!

2002-09-23 Thread Sean A Corfield

On Sunday, September 22, 2002, at 10:51 , Dave Watts wrote:
 2. If you're using any version of CF which supports the SCOPE attribute
 (4.5+, I think), use that with your CFLOCK tags around memory variables.

Just curious, do pre-MX versions of CF require scope-level locking (as 
opposed to named locks) for safe access to session variables?

In MX, it seems better practice to use named locks instead of scoped locks 
since that reduces the conflict between processes, e.g., if your session 
variable is 'x' then you might have:

cflock name=session_x ...
cfset session.x = 42/
/cflock

Note 1: that to read the variable in MX, you wouldn't need to lock.
Note 2: MX won't get corrupted if you omit locks - you only need locks to 
avoid race conditions.

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Jason Egan

Well, yes, if it is the same var you would want the same name... Sorry.
But if you have session.longprocess, and session.shortprocess then you
would want to use names on your locks, but wherever you have
session.longprocess you would use the same name... 

Jason
CFDynamics.com

 -Original Message-
 From: Smith, Matthew P -CONT(DYN) 
 [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 23, 2002 1:07 PM
 To: CF-Talk
 Subject: RE: cflocking de-mystified (was RE: WHY!!)
 
 
 
 But if you access two variables in the same scope(ie session) 
 at the same time because of different names, can't that cause 
 corruption?
 
 Also, readonly locks are simply pointers; the only time they 
 are locked down is during an exclusive lock as used during a write.
 
 Matthew P. Smith 
 Web Developer, Object Oriented 
 Naval Education  Training Professional 
 Development  Technology Center 
 (NETPDTC) 
 (850)452-1001 ext. 1245 
 [EMAIL PROTECTED] 
 
 
 -Original Message-
 From: Jason Egan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 12:06 PM
 To: CF-Talk
 Subject: RE: cflocking de-mystified (was RE: WHY!!)
 
 Right - I use the name attribute for cflock rather than scope
 (occasionally) because my understanding is that when you 
 lock on the 
 scope you Lock the entire scope down for that transaction -- if you 
 use names, then they are all (potentially) unique and you 
 won't have a 
 usually fast process waiting on a slow process - 
 essentially denying 
 client access because of scope locking...
 
 Jason
 CFDynamics.com
 
  -Original Message-
  From: Tony Weeg [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 7:53 AM
  To: CF-Talk
  Subject: cflocking de-mystified (was RE: WHY!!)
 
 
 
  my man, My Man!
  thank you dave.
 
  that's probably the funniest thing I have read this 
 morning and the 
  most informative email I have gotten in a long time in regards to 
  locking (kinda wish I'd made it to the locking
 
  session last year @ devcon)
 
  but anyway, it makes sense, plain and well done.
 
  thank you!
 
  ps...i implemented this into my code @ my office @ my 
 real job this 
  morning, and things are humming along
 
  now, I guess my next question would be, is the cflock 
 timeout sort 
  of an arbitrary guess as to what would be a good amount 
 of time? I 
  mean, how long are the lock timeouts on the heaviest hit cf pages 
  set for? whats a good number?
 
  ...tony
 
  Tony Weeg
  Senior Web Developer
  Information System Design
  Navtrak, Inc.
  Fleet Management Solutions
  www.navtrak.net
 
  410.548.2337
 
 
  -Original Message-
  From: Dave Watts [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 23, 2002 1:52 AM
  To: CF-Talk
  Subject: RE: WHY!!
 
 
   i havent used locks on session vars, havent
   needed to, and having never formally learned
   cf, not really 100% down with the thought
   process behind locking session var setting...
 
  The thought process is very simple. If you're running CF 5 or 
  earlier, and you're using session variables, and you don't lock 
  them, bad things will happen. Memory variables can be accessed by 
  concurrent requests, and CF doesn't handle that well, by default. 
  While you might not think session variables would be used by 
  concurrent requests, there are many possible cases in which more 
  than one request from the same user might be running concurrently.
 
   any good books on that topic?
 
  A book would be overkill, just for this topic. If you're 
 using CF 5 
  or earlier, just follow these simple rules:
 
  1. Dvery time you put Session, Application or 
 Server in your 
  code, use CFLOCK around it.
 
  2. If you're using any version of CF which supports the SCOPE 
  attribute (4.5+, I think), use that with your CFLOCK tags around 
  memory variables.
 
  3. If you're reading a memory variable, use 
 TYPE=READONLY in your 
  CFLOCK; if you may change the variable's value, use 
  TYPE=EXCLUSIVE.
 
  4. There is no rule 4.
 
  5. Reread rule 1.
 
  Dave Watts, CTO, Fig Leaf Software
  http://www.figleaf.com/
  voice: (202) 797-5496
  fax: (202) 797-5444
 
  : dream :: design :: develop :
  MXDC 02 :: Join us at this all day conference for
  designers  developers to learn tips, tricks, best practices and 
  more for the entire Macromedia MX suite.
 
  September 28, 2002  ::  http://www.mxdc02.com/
  (Register today, seats are limited!)
  ::
 
 
 
 
 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Matthew Walker

 Just curious, do pre-MX versions of CF require scope-level 
 locking (as 
 opposed to named locks) for safe access to session variables?

No they don't require it. In fact scope locking only came in as a cool
new feature with CF4.5 . Logically both will do the job, although as
Jason pointed out on the other thread, scope-locking, while convenient,
seems like overkill. Why lock down the entire scope just for one
variable?
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Dave Watts

  Just curious, do pre-MX versions of CF require 
  scope-level locking (as opposed to named locks) 
  for safe access to session variables?

 No they don't require it. In fact scope locking only 
 came in as a cool new feature with CF4.5 . Logically 
 both will do the job, although as Jason pointed out 
 on the other thread, scope-locking, while convenient,
 seems like overkill. Why lock down the entire scope 
 just for one variable?

One has to be very careful with the application of logic to solve these
sorts of problems, because very often one might not have the necessary facts
to justify initial assertions. You're right that logically, both should be
sufficient, but there's a reason that Allaire introduced the SCOPE
attribute. Remember, they introduced memory variables before they realized
they introduced a CFLOCK tag at all, and on the second version of CF with
this tag, they introduced the SCOPE attribute, so there's no reason to
assume that they did the job right the first time when it comes to locking
memory variables.

Also, with these memory variables, the scope itself is a variable, which
might cause problems if the entire scope isn't locked. Now, personally, I
just don't know enough about the internals of CF 5 (or any version of CF) to
say whether it's safe to use the NAME attribute instead of the SCOPE
attribute. What I do know is that if you don't lock memory variables in CF 5
or earlier, your server will typically crash under load, and if you
consistently lock memory variables with the SCOPE attribute, your server
won't crash under load. So, there's lots of leeway there for the NAME
attribute stuff to work well, or not work well. But I know that I can't
apply logic to solve this problem, since I just don't know enough about the
internals of the CF server. The only way to solve the problem is empirically
- try it under load and see.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444

: dream :: design :: develop : 
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite. 

September 28, 2002  ::  http://www.mxdc02.com/ 
(Register today, seats are limited!) 
:: 

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cflocking de-mystified (was RE: WHYYYYY!!!!!!)

2002-09-23 Thread Dave Watts

 yeah, I get that, but I guess what im looking for is 
 something like...

 1 cfset = wait for processing 1 sec.
 1 cfset + 1 whatever = wait for proc. 2.5 secs.

 are there any metrics or best practices for this? 

No, I'm not aware of any. The thing is, you're not concerned with how long
it'll take to execute the code within the lock, exactly, but how long you're
willing to wait to get access to a lock. So, you might have two blocks like
this:

!--- page 1 ---
cflock scope=session ...
 ... do something really long ...
/cflock

!--- page 2 ---
cflock scope=session ...
 ... do something that'll only take an instant ...
/cflock

So, how long should you lock the second block? If the first block might be
executing at the same time, and you absolutely don't want the second block
to timeout, you'd want to use the amount of time that the first block would
take - and you'd have to take into account how long that block takes under
server load!

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444

: dream :: design :: develop : 
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite. 

September 28, 2002  ::  http://www.mxdc02.com/ 
(Register today, seats are limited!) 
:: 

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-23 Thread Matt Liotta

I agree that empirical testing is the way to go, but I disagree with
your must lock memory variables rule. There are many applications that
can avoid the use of cflock even in pre-MX days. IMHO, adding additional
overhead when none is needed is foolish.

Matt Liotta
President  CEO
Montara Software, Inc.
http://www.montarasoftware.com/
888-408-0900 x901

 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 23, 2002 4:28 PM
 To: CF-Talk
 Subject: RE: WHY!!
 
   Just curious, do pre-MX versions of CF require
   scope-level locking (as opposed to named locks)
   for safe access to session variables?
 
  No they don't require it. In fact scope locking only
  came in as a cool new feature with CF4.5 . Logically
  both will do the job, although as Jason pointed out
  on the other thread, scope-locking, while convenient,
  seems like overkill. Why lock down the entire scope
  just for one variable?
 
 One has to be very careful with the application of logic to solve
these
 sorts of problems, because very often one might not have the necessary
 facts
 to justify initial assertions. You're right that logically, both
should be
 sufficient, but there's a reason that Allaire introduced the SCOPE
 attribute. Remember, they introduced memory variables before they
realized
 they introduced a CFLOCK tag at all, and on the second version of CF
with
 this tag, they introduced the SCOPE attribute, so there's no reason to
 assume that they did the job right the first time when it comes to
locking
 memory variables.
 
 Also, with these memory variables, the scope itself is a variable,
which
 might cause problems if the entire scope isn't locked. Now,
personally, I
 just don't know enough about the internals of CF 5 (or any version of
CF)
 to
 say whether it's safe to use the NAME attribute instead of the SCOPE
 attribute. What I do know is that if you don't lock memory variables
in CF
 5
 or earlier, your server will typically crash under load, and if you
 consistently lock memory variables with the SCOPE attribute, your
server
 won't crash under load. So, there's lots of leeway there for the NAME
 attribute stuff to work well, or not work well. But I know that I
can't
 apply logic to solve this problem, since I just don't know enough
about
 the
 internals of the CF server. The only way to solve the problem is
 empirically
 - try it under load and see.
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 phone: 202-797-5496
 fax: 202-797-5444
 
 : dream :: design :: develop :
 MXDC 02 :: Join us at this all day conference for
 designers  developers to learn tips, tricks, best
 practices and more for the entire Macromedia MX suite.
 
 September 28, 2002  ::  http://www.mxdc02.com/
 (Register today, seats are limited!)
 ::
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



WHYYYYY!!!!!!

2002-09-22 Thread Tony Weeg

for the love of jehovah could
someone please tell me why in the heck
these two lines are making a page stall 
to the point of never coming back when loading?

when i comment them, the page shows the rest
of the page fine, however when not commented
out, they make the page just sit in limbo?

cf5 iis5 winxp

form.email is defined, for sure.

cfcookie name=FinalRegisteredLive value=#form.email#
expires=never
cfset Session.Active=1

Heres moreif i have this code up

cfif isDefined(form.email)

Its Defined.
cfabort

cfcookie name=FinalRegisteredLive
value=#form.email# expires=never
cfset Session.Active=1

cfelse

Not defined.

/cfif

I get Its Defined on the page.

...tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331 

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-22 Thread Ian Lurie

Are you locking the CFSET? Session vars can hang the server if it's under
stress and the statement isn't locked...

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 22, 2002 9:29 PM
To: CF-Talk
Subject: WHY!!


for the love of jehovah could
someone please tell me why in the heck
these two lines are making a page stall
to the point of never coming back when loading?

when i comment them, the page shows the rest
of the page fine, however when not commented
out, they make the page just sit in limbo?

cf5 iis5 winxp

form.email is defined, for sure.

cfcookie name=FinalRegisteredLive value=#form.email#
expires=never
cfset Session.Active=1

Heres moreif i have this code up

cfif isDefined(form.email)

Its Defined.
cfabort

cfcookie name=FinalRegisteredLive
value=#form.email# expires=never
cfset Session.Active=1

cfelse

Not defined.

/cfif

I get Its Defined on the page.

..tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: WHYYYYY!!!!!!

2002-09-22 Thread S . Isaac Dealey

Tried a session lock around your session vars?

 for the love of jehovah could
 someone please tell me why in the heck
 these two lines are making a page stall
 to the point of never coming back when loading?

 when i comment them, the page shows the rest
 of the page fine, however when not commented
 out, they make the page just sit in limbo?

 cf5 iis5 winxp

 form.email is defined, for sure.

 cfcookie name=FinalRegisteredLive value=#form.email#
 expires=never
 cfset Session.Active=1

 Heres moreif i have this code up

   cfif isDefined(form.email)

   Its Defined.
   cfabort

   cfcookie name=FinalRegisteredLive
 value=#form.email# expires=never
   cfset Session.Active=1

   cfelse

   Not defined.

   /cfif

 I get Its Defined on the page.

 ...tony

 tony weeg
 [EMAIL PROTECTED]
 www.revolutionwebdesign.com
 rEvOlUtIoN wEb DeSiGn
 410.334.6331

 __
 
 Structure your ColdFusion code with Fusebox. Get the
 official book at http://www.fusionauthority.com/bkinfo.cfm
 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
 Archives:
 http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe:
 http://www.houseoffusion.com/index.cfm?sidebar=lists


Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-22 Thread Whiterod, David (PLNSA)

Tony,

 cfcookie name=FinalRegisteredLive value=#form.email# expires=never
 cfset Session.Active=1

What happens if you try each line individually - this would tell you if it
is stalling on the cookie or the set.

Cheers

David

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Monday, 23 September 2002 1:59 PM
To: CF-Talk
Subject: WHY!!


for the love of jehovah could
someone please tell me why in the heck
these two lines are making a page stall 
to the point of never coming back when loading?

when i comment them, the page shows the rest
of the page fine, however when not commented
out, they make the page just sit in limbo?

cf5 iis5 winxp

form.email is defined, for sure.

cfcookie name=FinalRegisteredLive value=#form.email#
expires=never
cfset Session.Active=1

Heres moreif i have this code up

cfif isDefined(form.email)

Its Defined.
cfabort

cfcookie name=FinalRegisteredLive
value=#form.email# expires=never
cfset Session.Active=1

cfelse

Not defined.

/cfif

I get Its Defined on the page.

..tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331 


__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-22 Thread Tony Weeg

no, but ill try that.

+++ im trying now. ++

not lookin good...its a shared server
environment, experthost.com. can they block
locking capabilities?

i havent used locks on session vars, havent
needed to, and having never formally learned
cf, not really 100% down with the thought
process behind locking session var setting...

any good books on that topic?

+

now back to the issueits the setting
of the cookie var that is buggin

now, the interesting part, is that this is
the setting of a cookie var called FinalRegisteredLive
which is already set, however now it needs
to be set with new data contained in it, am i
seeing that i have to make the value of it (nothing)
and then, reset it to a new value? or shouldnt
i be able to rewrite the value with the cfset?

tony


-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 23, 2002 12:41 AM
To: CF-Talk
Subject: Re: WHY!!


Tried a session lock around your session vars?

 for the love of jehovah could
 someone please tell me why in the heck
 these two lines are making a page stall
 to the point of never coming back when loading?

 when i comment them, the page shows the rest
 of the page fine, however when not commented
 out, they make the page just sit in limbo?

 cf5 iis5 winxp

 form.email is defined, for sure.

 cfcookie name=FinalRegisteredLive value=#form.email#
 expires=never
 cfset Session.Active=1

 Heres moreif i have this code up

   cfif isDefined(form.email)

   Its Defined.
   cfabort

   cfcookie name=FinalRegisteredLive
 value=#form.email# expires=never
   cfset Session.Active=1

   cfelse

   Not defined.

   /cfif

 I get Its Defined on the page.

 ...tony

 tony weeg
 [EMAIL PROTECTED]
 www.revolutionwebdesign.com
 rEvOlUtIoN wEb DeSiGn
 410.334.6331

 __
 
 Structure your ColdFusion code with Fusebox. Get the
 official book at http://www.fusionauthority.com/bkinfo.cfm
 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
 Archives:
 http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe:
 http://www.houseoffusion.com/index.cfm?sidebar=lists


Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-22 Thread Dave Watts

 i havent used locks on session vars, havent
 needed to, and having never formally learned
 cf, not really 100% down with the thought
 process behind locking session var setting...

The thought process is very simple. If you're running CF 5 or earlier, and
you're using session variables, and you don't lock them, bad things will
happen. Memory variables can be accessed by concurrent requests, and CF
doesn't handle that well, by default. While you might not think session
variables would be used by concurrent requests, there are many possible
cases in which more than one request from the same user might be running
concurrently.

 any good books on that topic?

A book would be overkill, just for this topic. If you're using CF 5 or
earlier, just follow these simple rules:

1. Dvery time you put Session, Application or Server in your code, use
CFLOCK around it.

2. If you're using any version of CF which supports the SCOPE attribute
(4.5+, I think), use that with your CFLOCK tags around memory variables.

3. If you're reading a memory variable, use TYPE=READONLY in your CFLOCK;
if you may change the variable's value, use TYPE=EXCLUSIVE.

4. There is no rule 4.

5. Reread rule 1.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

: dream :: design :: develop :
MXDC 02 :: Join us at this all day conference for 
designers  developers to learn tips, tricks, best 
practices and more for the entire Macromedia MX suite.

September 28, 2002  ::  http://www.mxdc02.com/
(Register today, seats are limited!)
::

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: WHYYYYY!!!!!!

2002-09-22 Thread Whiterod, David (PLNSA)

Tony,

You may find the following link useful:

ColdFusion Server (Versions 5 and Prior): ColdFusion Locking Best Practices

TechNote 20370
http://www.macromedia.com/v1/handlers/index.cfm?ID=20370Method=Full

cheers

David


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists