Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

usual server behaviour

Status
Not open for further replies.

ttrinh

MIS
Jan 21, 2002
93
0
0
AU
Hi
Can anyone tell me the possible reasons why cold fusion server would take a whole day to run a script that it normally would almost instantaneously? It does run it just that I don't get the result until a day later. Any ideas anyone? Many thanks in advance
 
if you are using application variables or queries that are cached within created time span, the cf server will respect the cached values and will not duplicate them by executing the same queries twice; you will have the same effect if application variable you are accessing is not changed by using cfset tag to a new value;
search your application for tag attributes that looks like this: cachedwithin="#CreateTimeSpan(1,0,0,0)#"; if found, that is probably where your problem is... Sylvano
dsylvano@hotmail.com
 
Hi Sylvano
Thanks for reply but I still don't understand why it would still wait a day to run when it previuosly run straight away ,even if it is cached. the code hasn't been altered at all. Also another this that is happening is autogenerated emails are sent twice instead of once ie the second one is sent approx one minute after the first.

many thanks and sorry that I don't understand. I am relatively new to this
 
Cachedwithin is used to specify a timespan for using the cached query data. For example, you can specify that the cached data will be used for a span of 1 day. To create a timespan, you will use CF's CreateTimeSpan function. That means that the query in question will NOT be executed, therefore the value will NOT be changed for specified period of time.
As for the email being sent twice, it might be the case where the TEMPLATE containing cfmail tag is executed two times.
You might want to step into your code and follow it step by step (small steps). Create a lot of break points and try to follow your code to make sure is executed the way you intended to. Sylvano
dsylvano@hotmail.com
 
but what if the application was working fine previously and no code has been altered from that time?
 
I am willing to bet here that you are dealing with a small error in the code that is messing up the application flow; the best advice I can give you (without debugging it myself) is to break the code apart and find where the error is; start with the most obvious things and don't assume anything. make sure that every tag is executed the way you want it.

be brave and reward will be appropriate... Sylvano
dsylvano@hotmail.com
 
How are you running the script -- are you manually launching it via a url or do you have cfschedule running it? If using cfschedule, check the settings for the time it will run.

When you say you "get the results a day later" what do you mean? Is it emailed to you? If so, what I would suggest is instead of emailing the results, display it to screen and run the app. If it all shows up on screen immediately, then it may have something to do with your mail server spooling it.

I can't imagine a cf app taking an entire day to run -- it will eventually time out.
 
Do other apps on the server work fine? Have you looked at the performance monitor. Are there any queries being executed?

Kola
 
Hi pigsie and CFDude

Thanks for your replies.
There are a total of 3 apps on the CF server . They are all pages linked off our intranet website. 2 of the apps are acting a bit strangely ie one of them are sending double emails it normally should. Recipients are getting them about one minute apart. It is sent from execution of queries (they are reminder emails)after a period of time has elapsed.
About the othet app (I am not too sure about the details as I am not looking after it. But seeing as they both are run on the cf server I thought they may be related) I will find out . The person responsible is not available currently
How would I check the performance monitor?
and yes I would have thought timeout would occur b4 it finishes processing if it is taking a whole day
 
Okay. How are the queries for the reminder emails getting executed? How are you timing that to run?

Performance monitor is available from the administrative tools.

Tim P.
 
As you have multiple apps on the same server I would try a process of elimination and see if the problem persists. Theres a few other things you can check - check the registry is not full and check that all the other apps on the server have locked shared scoped variables (session, application etc) if your app was working fine one of the other applications may be doing something to the server.

HTH
 
This may or may not help you. We had a simular problem on our Win2000 server where the CF programs would time out after 20 min (server settings coused the timeout). After checking the system monitor we found that the CFServer was running at 99% cpu and the problem would stop for a while after we stopped all of the cf services and restarted them. After about three months of of scrubbing all of our cf pages we still had the problem. We then scrubbed our asp pages and found a small error in one that when corrected ended our delema. I'm not sure why an asp page maxed out the cfserver on the cpu but we haven't had any problems since.

RnK
 
here is another tip kind of related to the discussion topic here. a lot of people have found out that for some unknown reason, cf server will put big strain on the cpu and hang the whole server.
that problem might be related to ntconsolejava application and is known issue in cf5. the following link is another forum's discussion that tried to solve this problem

Sylvano
dsylvano@hotmail.com
 
Another thing as well which would make earlier versions of CF cause the CPU to be at 99% is mail related problems which are caused when 1. You have email addresses in an invalid format being sent to the mail server (make sure you validate the format) you may find lots of 0 length mail in the spool or undelivered folders if possible try and clean out these folders and check if every application is sending email to email addresses with valid mail formats.

HTH

Kola
 
thanks all for your suggestions
i will check them out and keep you posted
 
It seems that there might be an infinite loop somewhere in the code. I've done that in the past, and a good indication is when the CPU usage is at 95% or higher. In code that I'm not sure of, I always add a fullproof counter method to prevent infinite loops from eating CPU Time... something like this:

<!--- Beginning of loop, increment some variable --->
<cfset inf_count = inf_count +1>

-- some code here --

<!--- Just before end of loop --->
<cfif inf_count GT 1000> <!--- or some value thats way too high for normal usage --->
<cfabort showerror=&quot;Infinite loop detected, aborting.&quot;>
</cfif>

Hope that helps... you might be surprised.. I know I was =)

MG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top