I am hosting my site with HostMySite, and it looks like they are using
SeeFusion to enforce a 50s timeout. Because of this (I think), it
takes me a few refreshes to get my application up and humming. Once
everything has been loaded in cache and such it runs super fast. The
problem I am having is when the cache times out and the app has to
'reinit'.
I have gone through all my handlers, model objects, plugins, etc,
making sure everything is set up to cache the way I want it. But, I
am leaning on ColdBox to do its thing so I am doing nothing in
onAppInit().
Can anyone offer any best practices for managing the cache in a shared
hosting environment like this? Should I be using onAppInit in some
way to reinforce what ColdBox does via autowiring/OCM defaults?
I believe this is the infamous classloading issue of cfmx8 with a jdk less than 1.6.11. You can do research about it online, but the only solution, is to upgrade the server’s JVM to the latest SDK. This is a bug that affects ANY application that uses extensive CFC’s.
Ok, so things are better since the upgrade to 13. However, it still
takes two trys to load the application if it has timed out. I checked
all of my singleton model objects, handlers, and plug-ins, and they
all include cacheTimeout=0. Is this as simple as extending the
application timeout in the application.cfc, or is there something else
going on? Is it normal for my application to take over 50 seconds to
init, or could I have overlooked something that is causing it to load
slowly?
If that's normal, what do you guys think about setting up a dummy
scheduled task to keep the application from timing out?
I've experienced "two tries to load the application" but only with my
"development" settings. My "production" settings don't experience this
and load within a few seconds.
If you're experiencing this with your dev settings, I'd check to see
if you still experience it with your production settings.
I’m actually seeing it in both dev and production environments.
I created an interceptor to grab tick counts at all the interception points. And it looks to be taking more than a minute to get to SessionStart. Here are my counts in seconds:
I’m sure the hang up is before session start because once I start the app from my laptop, my wife can start a new session on her laptop and it comes right up.
I’m not doing anything in my onAppInit. Doesn’t AFTERCONFIGURATIONLOAD occur AFTER SessionStart? In applicaiton.cfc, loadColdbox() is called from onApplicationStart. Why is sessionStart finishing before AFTERCONFIGURATIONLOAD?