Hey Brian, the lock is used to single-thread the loading of each phase so that an application isn't hammered by multiple requests that each trigger the load method for a phase, which is a relatively expensive process.
The named lock uses the application's directory path on the file system as a prefix in order to ensure a unique lock name in scenarios where more than one MG app happens to be running on a server, so the error message is just reflecting the full name of the lock, and this isn't indicative of any file-system locking. It does appear that your application is reloading frequently, however, as this locking/loading would only happen when the app is spinning up -- is this intentional? If not, then you will want to look into what might be causing this, as it is essentially having the same effect as a low-level DoS attack by making the application unavailable while it is reloading. For a large and complex application under load, it is definitely possible that waiting requests could time out on the lock if the initial request hasn't completed loading for the phase in question, particularly in the configuration phase, during which the XML config is parsed and loaded, as is the case here. Although it won't speed up the loading, you can increase the lock timeout threshold by setting the following variable in your app's index.cfm file: <cfset ModelGlue_INITIALIZATION_LOCK_TIMEOUT = 60> The default value is 60, so you can increase this to whatever seems reasonable. As a final note, we've changed the loading strategy used in the impending 3.2 release to "lazy load" only a portion of the configuration in order to dramatically speed up the loading process. We're going to be releasing a beta of this shortly, but if you want to try it out sooner let me know and I can get you the latest version of the code. -- Ezra Parker On Tue, Apr 12, 2011 at 11:28 AM, Brian Swartzfager <[email protected]> wrote: > I'm in a bit of a bind; hopefully someone can suggest a solution. > > I've got a Model-Glue application that users are hitting hard today, > and we're seeing a problem that we didn't see in regular testing. > Every hour or so, the app becomes unresponsive and my error handler > returns the following error message (with some directory names changed > to protect the not-so innocent): > > "A timeout occurred while attempting to lock /afs/system/department/ > sitename/htdocs/ > applicationFolder/.modelglue.phase.Configuration.loading." > > According to the trace, the line of code cited is line 36 of the > EventRequestPhase.cfc file in ModelGlue/gesture/eventrequest , which > is where Model-Glue sets an exclusive lock in order to load the > eventContext. > > Does anyone know exactly is being locked by this code? My server > admins (who are not ColdFusion developers) think that one or more > files are being locked by this code, and if so that's not something we > want to do because the application files are mounted/accessed via the > Andrew File System (AFS) > > I'm going to see if I can figure out what's going on myself, but if > anyone has any advice on this issue I'd be most appreciative. > > > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/model-glue?hl=en > -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
