ColdBox: The method _actionExists was not found in component

388 Views Asked by At

Running ColdBox 4.2 we were seeing this error after reinit, but only on one specific handler cfc. If we reinit several times it would eventually go away, which sounds like a race condition.

We thought of just doing extends="coldbox.system.EventHandler" directly rather than letting the framework mix in the handler methods, but then we began seeing another error:

Error building: myApp.handlers.admin.report -> The CONTROLLER parameter to the init function is required but was not passed in. with constructor arguments: {}

Similarly, this error would go away if we reinit a few times until we get one where things finish baking before a request comes in midway through the init.

We're not able to reproduce this on non-prod systems, likely due to substantially lower load.

Has anyone run into similar things and figured out a way to gracefully reinit the framework under load?

1

There are 1 best solutions below

5
On

I actually managed to reasonably reliably reproduce race condition errors during reinit's and posted it as a issue COLDBOX-307, pretty much the response is don't use fwreinit in production ever which is correct we switched to using our own method that calls applicationStop in application.cfc and it fixed the issues we were seeing when using fwreinit.

One thing to note when using applicationStop it isn't thread safe (maybe not the right term) which means application scope for all currently running requests will go bye bye when it is called so you can have some odd errors from reiniting this way.