Issue with startup 'breaking' MG

3 views
Skip to first unread message

Raymond Camden

unread,
Dec 10, 2009, 12:45:38 PM12/10/09
to model...@googlegroups.com
I've seen this on CFLib a few times now and always thought it was my
fault (well, it probably is), but today a user also saw it with
LighthousePro, a Model-Glue app. So it still could be my fault, but
now that I've seen it in two different code bases, I'm wondering if
this is a MG issue.

So the issue: You go to your MG app. Something goes wrong, an
exception of some sort. You fix the exception and try to hit the site
again. But now MG says event page.index doesn't exist. (Or whatever
your default event is.) It is as if MG has "loaded" but loaded in a
corrupt state. You can fix it easily enough with a reinit, but if your
server restarts at night, and if a temporary error occurs, like a
timeout for example, than your app is screwed until you hit it with
the reinit.

Has anyone seen this before? I could probably make a reproducible case
by forcing a timeout with a sleep() command.


--
===========================================================================
Raymond Camden, ColdFusion Jedi Master

Email : r...@camdenfamily.com
Blog : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with the community: http://www.coldfusionbloggers.org

James Allen

unread,
Dec 10, 2009, 12:56:41 PM12/10/09
to model...@googlegroups.com
I saw this recently on a site I have running on Railo 3.1. I had a problem
mid-init and then after I fixed it and re-inited I got an error saying that
event 'page.home' was undefined. I had to actually restart Railo to fix the
problem.

---
James Allen
E: ja...@jamesallen.name
Blog: http://jamesallen.name
Twitter: @CFJamesAllen (Coldfusion / Web development)
Twitter: @jamesallenuk (General)
Lead developer of http://errrrrrr.com
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Tom McNeer

unread,
Dec 10, 2009, 1:01:36 PM12/10/09
to model...@googlegroups.com
I have also seen this behavior, although it's been a long time, and I can't remember details.

I can say, however, that it has occurred on both CF7 and 8, and sometimes required restarting the CF service.


--
Thanks,

Tom

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

Dan Wilson

unread,
Dec 10, 2009, 1:04:03 PM12/10/09
to model...@googlegroups.com
I have seen this also. I would think this would be an issue with any framework or application that had a bunch of CFCs stored in a shared scope and wasn't able to initialize all the way.

DW


--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
 
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en



--
“Come to the edge, he said. They said: We are afraid. Come to the edge, he said. They came. He pushed them and they flew.”

Guillaume Apollinaire quotes

Chris Peterson

unread,
Dec 10, 2009, 1:11:27 PM12/10/09
to model...@googlegroups.com
I have gotten this almost 100% of the time after deploying a newish MG app using CFAnt.  Deploy, the script clears trusted cache and re-enabled it.  Re-init’ing the MG app fixes it every time.  If some fires go out, I will try and work out what is going on.

Chris



On 12/10/09 1:04 PM, "Dan Wilson" <sipa...@gmail.com> wrote:

John Rossi

unread,
Dec 10, 2009, 1:33:35 PM12/10/09
to model...@googlegroups.com

I have only seen this in MG3 when I get a timeout loading an app for the
first time. Usually manually reloading the app with init=true resolves the
issue for me. I don't ever recall this happening in MG2. In MG 2, unless I
am mistaken, if you tried to load an app for the first time and it timed
out, you could simply refresh the page it would attempt to reload itself
again, in MG3 it just throws that error.

John

-----Original Message-----
From: model...@googlegroups.com [mailto:model...@googlegroups.com] On
Behalf Of Raymond Camden
Sent: Thursday, December 10, 2009 12:46 PM
To: model...@googlegroups.com
Subject: [Model-Glue] Issue with startup 'breaking' MG

Dennis Clark

unread,
Dec 10, 2009, 4:29:57 PM12/10/09
to model...@googlegroups.com
I took a look at the MG source code and have identified the problem.

In MG3 the framework is not fully loaded all at once. Instead, the framework is bootstrapped with only the core event handlers, and controllers for those event handlers complete the different tasks required for loading the rest of the framework. One of these tasks (done in the initialization phase) is to put the framework into the application scope.

The problem is that if an exception such as a request timeout occurs after the framework is put into the application scope but before the framework is fully loaded, the framework is left persisted in an incomplete state. The application will then be stuck with a partially loaded framework object until the next init. 

My suggestion for the MG team is to move the code that puts the framework object into the application scope from the initialization phase to the termination phase (which is currently commented out in the source). This has the side-effect of reloading the framework on every request until it can complete a request successfully. I would consider this side-effect a bonus feature: if my first request after an init fails I'm likely to want to re-init anyway.

While I'm at it, I have another suggestion for the MG team: remove the cflock from ModelGlue.cfm, the MG3 framework bootstrapper doesn't need it.

Cheers,

Dennis

Raymond Camden

unread,
Dec 10, 2009, 4:37:24 PM12/10/09
to model...@googlegroups.com
This sounds great Dennis. Dan - can we make it happen?

Dan Wilson

unread,
Dec 10, 2009, 4:50:38 PM12/10/09
to model...@googlegroups.com
It definitely is worth looking into for 3.2. Please add this to the trac site so we can trac (pun intended) progress.


DW

--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Raymond Camden

unread,
Dec 10, 2009, 5:11:44 PM12/10/09
to model...@googlegroups.com
#368 created.
Reply all
Reply to author
Forward
0 new messages