RE: Slow-starting jrun service

2013-05-10 Thread Patti, Michael

Thanks Byron, Dave, Russ, and Gonzo for your helpful suggestions.  

There were a massive number of files on C:/windows/temp (1.6 GB worth), and I 
was only able to begin to delete them by running del C:\windows\temp\*.* from 
the command prompt.  Right now, there are still around 200 mb of files in that 
folder, but it's steadily decreasing.

I also un-checked Save class files under server settings  Caching and 
updated my JVM settings to:

# Arguments to VM
java.args=-server -Xmx1024m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=256m 
-XX:+AggressiveHeap -XX:+UseParallelGC 
-Dcoldfusion.rootDir={application.home}/../ 
-Dcoldfusion.libPath={application.home}/../lib 
-Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars

That combination of things definitely helped, and Coldfusion was able to start 
up in 2 minutes rather than 30.  

I suspect that the windows temp files were the culprit, and I'm going to work 
with my hosting provider to figure out why there were so many files in the that 
directory; but your advice has saved me hours of work.  

Eternally grateful,
Michael





-Original Message-
From: Byron Mann [mailto:byronos...@gmail.com] 
Sent: Thursday, May 09, 2013 9:46 PM
To: cf-talk
Subject: Re: Slow-starting jrun service


You could try starting cf from the command line, may give you a bit more 
insight as to where things are lagging at startup.

Kill anything else running like anti virus, and etc that may be getting in the 
way.

Check c:/windows/temp, had a machine with obscene number of files in there one 
time and services would start really really slow.

If fusion reactor is running on there or anything similar, maybe disable that 
for now.

Byron Mann
Lead Engineer  Architect
HostMySite.com




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355702
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Slow-starting jrun service

2013-05-10 Thread Russ Michaels

Unfortunately there is no auto cc cleanup of any of the tmp folders, you do
have to check them every so often.
Cf has its own that it uses as well as the windows one, it's in the wwwroot
folder  I think.

Regards
Russ Michaels
www.michaels.me.uk
www.cfmldeveloper.com - Free CFML hosting for developers
www.cfsearch.com - CF search engine
On 10 May 2013 07:31, Patti, Michael mpa...@sherwood-group.com wrote:


 Thanks Byron, Dave, Russ, and Gonzo for your helpful suggestions.

 There were a massive number of files on C:/windows/temp (1.6 GB worth),
 and I was only able to begin to delete them by running del
 C:\windows\temp\*.* from the command prompt.  Right now, there are still
 around 200 mb of files in that folder, but it's steadily decreasing.

 I also un-checked Save class files under server settings  Caching and
 updated my JVM settings to:

 # Arguments to VM
 java.args=-server -Xmx1024m -Dsun.io.useCanonCaches=false
 -XX:MaxPermSize=256m -XX:+AggressiveHeap -XX:+UseParallelGC
 -Dcoldfusion.rootDir={application.home}/../
 -Dcoldfusion.libPath={application.home}/../lib
 -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars

 That combination of things definitely helped, and Coldfusion was able to
 start up in 2 minutes rather than 30.

 I suspect that the windows temp files were the culprit, and I'm going to
 work with my hosting provider to figure out why there were so many files in
 the that directory; but your advice has saved me hours of work.

 Eternally grateful,
 Michael





 -Original Message-
 From: Byron Mann [mailto:byronos...@gmail.com]
 Sent: Thursday, May 09, 2013 9:46 PM
 To: cf-talk
 Subject: Re: Slow-starting jrun service


 You could try starting cf from the command line, may give you a bit more
 insight as to where things are lagging at startup.

 Kill anything else running like anti virus, and etc that may be getting in
 the way.

 Check c:/windows/temp, had a machine with obscene number of files in there
 one time and services would start really really slow.

 If fusion reactor is running on there or anything similar, maybe disable
 that for now.

 Byron Mann
 Lead Engineer  Architect
 HostMySite.com




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355703
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Weird directoryList problem after migration from CF8 to CF10

2013-05-10 Thread Edward Chanter

I'm using the CFM filemanager, it's an old piece of code but has worked
great until now. It's not supported any more and I've encountered a weird
problem after migrating from CF8 to CF10

I'm getting an error after a directoryList()

The code in question is: cfset thisDir = directoryList(directory,false)

the error is:

Attribute validation error for tag cfloop.
The value of the attribute query, which is currently thisDir, is invalid.

But when I do a cfdump of the  thisDir variable

cfset thisDir = directoryList(directory,false)
cfdump var=#thisDir#
cfabort

I get this:

array
1 ** correct path to file**\080909 - 2009 and the decisions you should take
part 2.doc
2  ** correct path to file**\1.jpg
3  ** correct path to file**\10 Challenges to Delivering a Unified Customer
Experience.pdf
4  ** correct path to file**\10 Challenges to Delivering a Unified Customer
Experience1.pdf
5  ** correct path to file**\10 Challenges to Delivering a Unified Customer
Experience2.pdf
...
3531  ** correct path to file**\~$mbership Summary - Padraig Drennan Sept
2011.docx

So it lists out the folder no problemo.

What am I missing here? I've been staring at it so long I can't see the
wood from the trees. Is there an undocumented change or bug in CF10 that
relates to directoryList()? I tried googling the problem but couldn't find
anything.

Any help would be most appreciated, I could find another file manager but
the CF-junkie in me is completely perplexed with this error and would
*love* to figure out what's happening.

Thanks in advance :)


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355704
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Weird directoryList problem after migration from CF8 to CF10

2013-05-10 Thread Raymond Camden

In your cfdump, did you notice it said array? That's why you couldn't use
the result as a query, it was an array.

Did you check the docs?

http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSce19a0e5a003e2edfa09972122fa66a2e8-7ffe.html

Use the third argument to specify query and you should be fine.



On Fri, May 10, 2013 at 6:06 AM, Edward Chanter firew...@cc.uk.com wrote:


 I'm using the CFM filemanager, it's an old piece of code but has worked
 great until now. It's not supported any more and I've encountered a weird
 problem after migrating from CF8 to CF10

 I'm getting an error after a directoryList()

 The code in question is: cfset thisDir = directoryList(directory,false)

 the error is:

 Attribute validation error for tag cfloop.
 The value of the attribute query, which is currently thisDir, is invalid.

 But when I do a cfdump of the  thisDir variable

 cfset thisDir = directoryList(directory,false)
 cfdump var=#thisDir#
 cfabort

 I get this:

 array
 1 ** correct path to file**\080909 - 2009 and the decisions you should take
 part 2.doc
 2  ** correct path to file**\1.jpg
 3  ** correct path to file**\10 Challenges to Delivering a Unified Customer
 Experience.pdf
 4  ** correct path to file**\10 Challenges to Delivering a Unified Customer
 Experience1.pdf
 5  ** correct path to file**\10 Challenges to Delivering a Unified Customer
 Experience2.pdf
 ...
 3531  ** correct path to file**\~$mbership Summary - Padraig Drennan Sept
 2011.docx

 So it lists out the folder no problemo.

 What am I missing here? I've been staring at it so long I can't see the
 wood from the trees. Is there an undocumented change or bug in CF10 that
 relates to directoryList()? I tried googling the problem but couldn't find
 anything.

 Any help would be most appreciated, I could find another file manager but
 the CF-junkie in me is completely perplexed with this error and would
 *love* to figure out what's happening.

 Thanks in advance :)


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355705
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Weird directoryList problem after migration from CF8 to CF10

2013-05-10 Thread Edward Chanter

Hi Ray,

Just tried it:

cfset thisDir = directoryList(directory,false,query)

Now I get an error:
Complex object types cannot be converted to simple values.
The expression has requested a variable or an intermediate expression
result as a simple value. However, the result cannot be converted to a
simple value. Simple values are strings, numbers, boolean values, and
date/time values. Queries, arrays, and COM objects are examples of complex
values.
The most likely cause of the error is that you tried to use a complex value
as a simple one. For example, you tried to use a query variable in a cfif
tag.
The error occurred in
E:/domains/live/ce/wwwroot/admin/fileManager/cffm.cfc: line 419
Called from E:/domains/live/ce/wwwroot/admin/fileManager/cffm.cfm: line 597
Called from E:/domains/live/ce/wwwroot/admin/fileManager/cffm.cfm: line 1
417 : cfif type is dir
418 : !--- go deep! ---
419 : cfset directoryList(directory  path  name,true,dirInfo)
420 : /cfif
421 : /cfloop

The whole function that's causing the error is here:

cffunction access=public name=directoryList output=true
returnType=query HINT=List the contents of a directory, optionally
recursing into subdirectories.  This was implemented due to inconsistencies
between Coldfusion and Bluedragon.
cfargument name=directory type=string required=true
cfargument name=recurse type=boolean required=false default=false
!--- temp vars ---
!--- example:  list = DirectoryList(dir,,,true); ---
 cfargument name=dirInfo type=query required=false
cfargument name=thisDir type=query required=false
cfset var path=
cfset var temp=

cfif not recurse
cfdirectory name=temp directory=#directory#
cfreturn temp
cfelse
!--- We loop through until done recursing drive ---
cfif not isDefined(dirInfo)
cfset dirInfo =
queryNew(attributes,datelastmodified,mode,name,size,type,directory,fullPath)
/cfif
cfset thisDir = directoryList(directory,false,query)
!---cfdump var=#thisDir#
cfabort---
cfif server.os.name contains Windows
cfset path = \
cfelse
cfset path = /
/cfif
cfloop query=thisDir
cfset queryAddRow(dirInfo)
cfset querySetCell(dirInfo,attributes,attributes)
cfset querySetCell(dirInfo,datelastmodified,datelastmodified)
cfset querySetCell(dirInfo,mode,mode)
cfset querySetCell(dirInfo,name,name)
cfset querySetCell(dirInfo,size,size)
cfset querySetCell(dirInfo,type,type)
cfset querySetCell(dirInfo,directory,directory)
Cfset querySetCell(dirInfo,fullPath,directory  path  name)
cfif type is dir
!--- go deep! ---
cfset directoryList(directory  path  name,true,dirInfo)
/cfif
/cfloop
cfreturn dirInfo
/cfif
/cffunction

So I commented out:

cfif type is dir
!--- go deep! ---
cfset directoryList(directory  path  name,true,dirInfo)
/cfif

Now it loads a few lines in the filemanager and then throws another error.
Won't bore you with that one too.

I think I will have to find a more up to date file manager for this client
:)




On 10 May 2013 12:18, Raymond Camden raymondcam...@gmail.com wrote:


 In your cfdump, did you notice it said array? That's why you couldn't use
 the result as a query, it was an array.

 Did you check the docs?


 http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSce19a0e5a003e2edfa09972122fa66a2e8-7ffe.html

 Use the third argument to specify query and you should be fine.



 On Fri, May 10, 2013 at 6:06 AM, Edward Chanter firew...@cc.uk.com
 wrote:

 
  I'm using the CFM filemanager, it's an old piece of code but has worked
  great until now. It's not supported any more and I've encountered a weird
  problem after migrating from CF8 to CF10
 
  I'm getting an error after a directoryList()
 
  The code in question is: cfset thisDir = directoryList(directory,false)
 
  the error is:
 
  Attribute validation error for tag cfloop.
  The value of the attribute query, which is currently thisDir, is invalid.
 
  But when I do a cfdump of the  thisDir variable
 
  cfset thisDir = directoryList(directory,false)
  cfdump var=#thisDir#
  cfabort
 
  I get this:
 
  array
  1 ** correct path to file**\080909 - 2009 and the decisions you should
 take
  part 2.doc
  2  ** correct path to file**\1.jpg
  3  ** correct path to file**\10 Challenges to Delivering a Unified
 Customer
  Experience.pdf
  4  ** correct path to file**\10 Challenges to Delivering a Unified
 Customer
  Experience1.pdf
  5  ** correct path to file**\10 Challenges to Delivering a Unified
 Customer
  Experience2.pdf
  ...
  3531  ** correct path to file**\~$mbership Summary - Padraig Drennan Sept
  2011.docx
 
  So it lists out the folder no problemo.
 
  What am I missing here? I've been staring at it so long I can't see the
  wood from the trees. Is there an undocumented change or bug in CF10 that
  relates to directoryList()? I tried googling the problem but couldn't
 find
  anything.
 
  Any help would be most appreciated, I could find another file manager but
  the CF-junkie in me is completely perplexed with this error and would
  *love* to figure out what's happening.
 
  Thanks in advance :)
 
 
 

 

RE: Weird directoryList problem after migration from CF8 to CF10

2013-05-10 Thread DURETTE, STEVEN J

Ed,

This is most likely due to the fact that directoryList is now a built in 
function in ColdFusion 10. It doesn't seem to have the same inputs as the 
function that you are using. 

Steve



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355707
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Weird directoryList problem after migration from CF8 to CF10

2013-05-10 Thread Edward Chanter

That would explain it Steve, thanks :)

Turns out that when the client asked for all the functionality they didn't
need it. Now all they want is to upload, view and delete so I can build a
pretty simple page in CF for that. Problem solved.



On 10 May 2013 13:14, DURETTE, STEVEN J sd1...@att.com wrote:


 Ed,

 This is most likely due to the fact that directoryList is now a built in
 function in ColdFusion 10. It doesn't seem to have the same inputs as the
 function that you are using.

 Steve



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355708
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFSchedule runs 2nd task on its own

2013-05-10 Thread Chris

We have a client's CFSchedule task with a 4 minute request timeout. The
task always takes longer than 4 minutes.  The task's cfm page sets
requesttimeout=15000.

CFSchedule starts the task, and at the end of 4 minutes CFSchedule
announces the timeout and task rescheduling, then runs the same task again.
Both tasks run to finish, as monitored in FusionReactor.

Has anybody ever seen this?

thanks,
Chris


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355710
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFSchedule runs 2nd task on its own

2013-05-10 Thread Russ Michaels

Are you saying you want it to time-out but it isn't?

Regards
Russ Michaels
www.michaels.me.uk
www.cfmldeveloper.com - Free CFML hosting for developers
www.cfsearch.com - CF search engine
On 10 May 2013 21:13, Chris 0404tow...@gmail.com wrote:


 We have a client's CFSchedule task with a 4 minute request timeout. The
 task always takes longer than 4 minutes.  The task's cfm page sets
 requesttimeout=15000.

 CFSchedule starts the task, and at the end of 4 minutes CFSchedule
 announces the timeout and task rescheduling, then runs the same task again.
 Both tasks run to finish, as monitored in FusionReactor.

 Has anybody ever seen this?

 thanks,
 Chris


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355711
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database inserts seem to timeout

2013-05-10 Thread Chris Hardman

Hi,

I have an application which takes a variety of temperature and pressure
readings and runs them through a set of calculations, which are then saved
to the database.

Scheduled tasks also do periodic calculations, averaging the results over a
calendar month, quarter or year.

Both new periods (months) and new calculations have been added to these
routines, and as a result, I need to recalculate several years' worth of
data.

Since even the existing periods (quarters and years) must be recalculated
to incorporate the new, additional calcs, I'm choosing to simply
recalculate everything and insert it into new tables, which will then
replace the old ones.

However, when I run the routine that will recalc all this data, the inserts
run fine for some period of time, then stop. There's no error returned from
CF, and in fact, the page never returns at all.

I've set a very long CF timeout so that the routine can continue. The
inserts simply stop happening.

I see no memory or CPU problems on the server when this runs.

Does anyone have any insight into what might be happening here?


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


Generally it is quicker to store everything you need into an array of some 
sort, then when you go to do your insert loop over that array.

For MySQL

insert into temperature (thisTemp) VALUES cfloop from=1 
to=#arrayLen(tempArray)# index=itempArray[#i#]cfif i lt 
arrayLen(tempArray),/cfif

Oracle would be a little different.  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355712
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database inserts seem to timeout

2013-05-10 Thread Russ Michaels

don't forget the DSN also has a timeout.


On Fri, May 10, 2013 at 9:48 PM, Chris Hardman chrishard...@discover.comwrote:


 Hi,
 
 I have an application which takes a variety of temperature and pressure
 readings and runs them through a set of calculations, which are then saved
 to the database.
 
 Scheduled tasks also do periodic calculations, averaging the results over
 a
 calendar month, quarter or year.
 
 Both new periods (months) and new calculations have been added to these
 routines, and as a result, I need to recalculate several years' worth of
 data.
 
 Since even the existing periods (quarters and years) must be recalculated
 to incorporate the new, additional calcs, I'm choosing to simply
 recalculate everything and insert it into new tables, which will then
 replace the old ones.
 
 However, when I run the routine that will recalc all this data, the
 inserts
 run fine for some period of time, then stop. There's no error returned
 from
 CF, and in fact, the page never returns at all.
 
 I've set a very long CF timeout so that the routine can continue. The
 inserts simply stop happening.
 
 I see no memory or CPU problems on the server when this runs.
 
 Does anyone have any insight into what might be happening here?
 
 
 --
 Thanks,
 
 Tom
 
 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560


 Generally it is quicker to store everything you need into an array of some
 sort, then when you go to do your insert loop over that array.

 For MySQL

 insert into temperature (thisTemp) VALUES cfloop from=1
 to=#arrayLen(tempArray)# index=itempArray[#i#]cfif i lt
 arrayLen(tempArray),/cfif

 Oracle would be a little different.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355713
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database inserts seem to timeout

2013-05-10 Thread Tom McNeer

@Chris,

Thanks for the thought. Placing things in a array would require me to wrap
existing routines with new code, rather than iterating over the routines
that create these records on a periodic basis. While that might be helpful,
I'd still like to know why the insert statements simply stop. It seems
unlikely that working through an array would be much faster.

It does make me think, however, that perhaps CF is failing at some point,
even though there's no error, and no longer making the calls to the
database. However, I'm not sure how to deterrnine this, since the request
never errors out or even returns.

@Russ,

Thanks. I'm aware that the DSN has a timeout; but unless I'm wrong, it's
completely different from a CF timeout. While the latter times out a
request that takes too long, my impression is that the Timeout setting on
the DSN is the number of minutes that CF will maintain an unused connection
to the datasource before kiiling the connection.

In this case, the connection is hardly unused. And even if the connection
were closed, CF should establish a new connection.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355714
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database inserts seem to timeout

2013-05-10 Thread Mike Chabot

It could be a database resource locking issue. Try committing transactions
in smaller batches, such as after every insert.

-Mike Chabot


On Fri, May 10, 2013 at 5:07 PM, Tom McNeer tmcn...@gmail.com wrote:


 @Chris,

 Thanks for the thought. Placing things in a array would require me to wrap
 existing routines with new code, rather than iterating over the routines
 that create these records on a periodic basis. While that might be helpful,
 I'd still like to know why the insert statements simply stop. It seems
 unlikely that working through an array would be much faster.

 It does make me think, however, that perhaps CF is failing at some point,
 even though there's no error, and no longer making the calls to the
 database. However, I'm not sure how to deterrnine this, since the request
 never errors out or even returns.

 @Russ,

 Thanks. I'm aware that the DSN has a timeout; but unless I'm wrong, it's
 completely different from a CF timeout. While the latter times out a
 request that takes too long, my impression is that the Timeout setting on
 the DSN is the number of minutes that CF will maintain an unused connection
 to the datasource before kiiling the connection.

 In this case, the connection is hardly unused. And even if the connection
 were closed, CF should establish a new connection.



 --
 Thanks,

 Tom

 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Checking if a file exist - then choice to overwrite or not ...

2013-05-10 Thread lesm...@bellsouth.net lesm...@bellsouth.net

I'm working on building a document. Got almost everything working perfect, 
except ...

When a user tries to upload a file into the depo, I'm checking to see if 
there's already a file with that name. If there IS, the offer them a choice to 
cancel, or overwrite.

So, something like

cffile action=UPLOAD filefield=doc destination=C:\MyPart\temp\ ... blah 
/   

cfif FileExists(C:\MyPart\#filetoupload#)  !--- this works - no problem 
---

!--- here's where I get into trouble I need to do the pseudo code below ---

!--- SHOW AN ALERT HERE: ---
THERE'S ALREADY A FILE WITH THIS NAME. DO YOU WANT TO OVERWRITE?
  Choice NO {
  !--- STOP PROCESSING AND RETURN TO THE ORIGINAL FORM --- }
  Choice YES {
  !--- UPLOAD/MOVE the file where it needs to go and overwrite the 
original --- }

cfelse !--- there's not a duplicate, so do your file stuff ---

   cffile action=upload ... blah  /

/cfif

I've tried various javascript alerts ... but CF either keeps processing past 
the alert, or just does nothing with it... like:

 script type=text/javascript
   ! function makesure() { 
if (confirm('Overwrite?')) {
   return true;
 } else { 
 alert('Deletion of this item cancelled.');
 window.location = 'test_files.cfm';
return false;
}
   }();   
 /script

There's GOT TO BE A BETTER WAY!! Anybody got a link to a good tutorial or 
anything for this? So far, I've not turned up anything on Google that works... 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355716
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFSchedule runs 2nd task on its own

2013-05-10 Thread Chris

Thanks Russ.  No, I know 'requesttimeout doesn't actual time it out. My
real concern is why CFSchedule appears to be starting a second task on its
own.

It's bad enough one of these long-running tasks runs so long ... but two of
them is ... uh ... twice as bad.

Chris


On Fri, May 10, 2013 at 4:34 PM, Russ Michaels r...@michaels.me.uk wrote:


 Are you saying you want it to time-out but it isn't?

 Regards
 Russ Michaels
 www.michaels.me.uk
 www.cfmldeveloper.com - Free CFML hosting for developers
 www.cfsearch.com - CF search engine
 On 10 May 2013 21:13, Chris 0404tow...@gmail.com wrote:

 
  We have a client's CFSchedule task with a 4 minute request timeout. The
  task always takes longer than 4 minutes.  The task's cfm page sets
  requesttimeout=15000.
 
  CFSchedule starts the task, and at the end of 4 minutes CFSchedule
  announces the timeout and task rescheduling, then runs the same task
 again.
  Both tasks run to finish, as monitored in FusionReactor.
 
  Has anybody ever seen this?
 
  thanks,
  Chris
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355717
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFSchedule runs 2nd task on its own

2013-05-10 Thread Russ Michaels

try deleting task, restart cf, re-creating the task, the sometimes fixes
such issues.
Are you on an old version of cf by any chance, I think this was a known
issue on cf7/8

The most common reason I find for tasks running twice is where people have
changed hosts and they have left the scheduled task still setup at the old
host, so it gets run once form the old host and once from the new host.


On Fri, May 10, 2013 at 11:02 PM, Chris 0404tow...@gmail.com wrote:


 Thanks Russ.  No, I know 'requesttimeout doesn't actual time it out. My
 real concern is why CFSchedule appears to be starting a second task on its
 own.

 It's bad enough one of these long-running tasks runs so long ... but two of
 them is ... uh ... twice as bad.

 Chris


 On Fri, May 10, 2013 at 4:34 PM, Russ Michaels r...@michaels.me.uk
 wrote:

 
  Are you saying you want it to time-out but it isn't?
 
  Regards
  Russ Michaels
  www.michaels.me.uk
  www.cfmldeveloper.com - Free CFML hosting for developers
  www.cfsearch.com - CF search engine
  On 10 May 2013 21:13, Chris 0404tow...@gmail.com wrote:
 
  
   We have a client's CFSchedule task with a 4 minute request timeout. The
   task always takes longer than 4 minutes.  The task's cfm page sets
   requesttimeout=15000.
  
   CFSchedule starts the task, and at the end of 4 minutes CFSchedule
   announces the timeout and task rescheduling, then runs the same task
  again.
   Both tasks run to finish, as monitored in FusionReactor.
  
   Has anybody ever seen this?
  
   thanks,
   Chris
  
  
  
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355718
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database inserts seem to timeout

2013-05-10 Thread Russ Michaels

yes cf will establish a new connection, but these are not used for any
currently running requests which are waiting for a response back form the
database, which will just hang indefinitely.
So in theory, if cf sends a request to the database and has not had a reply
within 20 minutes and nothing else has used the connection since, it would
then just hang.



On Fri, May 10, 2013 at 10:07 PM, Tom McNeer tmcn...@gmail.com wrote:


 @Chris,

 Thanks for the thought. Placing things in a array would require me to wrap
 existing routines with new code, rather than iterating over the routines
 that create these records on a periodic basis. While that might be helpful,
 I'd still like to know why the insert statements simply stop. It seems
 unlikely that working through an array would be much faster.

 It does make me think, however, that perhaps CF is failing at some point,
 even though there's no error, and no longer making the calls to the
 database. However, I'm not sure how to deterrnine this, since the request
 never errors out or even returns.

 @Russ,

 Thanks. I'm aware that the DSN has a timeout; but unless I'm wrong, it's
 completely different from a CF timeout. While the latter times out a
 request that takes too long, my impression is that the Timeout setting on
 the DSN is the number of minutes that CF will maintain an unused connection
 to the datasource before kiiling the connection.

 In this case, the connection is hardly unused. And even if the connection
 were closed, CF should establish a new connection.



 --
 Thanks,

 Tom

 Tom McNeer
 MediumCool
 http://www.mediumcool.com
 1735 Johnson Road NE
 Atlanta, GA 30306
 404.589.0560


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355719
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm