I've just installed CF11 on my cloud server (running Windows Server 2008 R2) for a shopping cart app using SQL Express Edition in the backend. After periods of inactivity, especially every morning, when I go into my app, it clocks for about a minute then errors out. Eventually, after another try, I'm able to run my app but it's sluggish for another couple clicks then it's back to normal.
I've been running this app on an older version of CF for almost a decade (I just upgraded to CF11 last month) and this problem never happened during that time. Can you provide any guidance on how I can fix this problem?
There are a number of factors that could be involved.
I'm not a technical person so I'm not sure 100% sure about the answers to your questions. If I've answered them incorrectly, please let me know how I can get that information to you.
1. I believe the answer to this question is IIS. I've had Rackspace (our host company) in the past make the required changes to the server in order to keep it "awake" if that's the correct term.
2. I don't have an answer to this question.
3. The CF app probably has a few people on it at any given moment in the day; in a typical hour, the most that would be on the server working with the app is around 20 users.
Unfortunately, you really only answered the first question: Rackspace. I would double check with them to make sure your virtual server itself isn't going into a sleep mode during off-hours.
For question 2, you will need to log into CF Administrator and note the Application and Session timeout settings, and let us know. Also, you need to examine your Application.cfm or Application.cfc and see if server-wide timeouts are being overridden (look for ApplicationTimeout and SessionTimeout).
For question 3: you said in your initial post "After periods of inactivity, especially every morning". This implies there are periods where NO users are using the app, and is quite likely when your timeouts are occurring. If the application times out in ColdFusion, the application is stopped and the first request after it is stopped will restart it. Depending on what you have in your Application.cfm/.cfc, this could either be a very quick process or a very lengthy one.
Another possibility is the database. Depending on the level of activity and if you have any scheduled database tasks running (like database maintenance/index rebuilding or SSIS packages running), the database itself could be the issue. SQL Server Express is throttled to only use one CPU core, 1 GB of memory, and has a size limit on databases (the limit varies depending on which release of SQL Server you are using).
Lots to think about Carl!
Do you know of a fee-for service whereby a certified Adobe CF person could connect remotely to my server and make the necessary changes?
Thanks Carl I can¹t write it enough times!!
I¹ll give Charlie a call now.
Have you fully updated your CF11 (Currently on update 3)? There were a few fixes in Update 1 for the behaviour you mention. I had a Win 2k8 server running IIS and experienced these issues, after installing the update and re applying the website connector it all went away.
Thanks haxtbh - I'll give that a try.