[coldbox:14616] Timeout in cfdirectory when starting up

sorry, meant default request timeOUT.


In this forum I read some answers respect to this problem and one of
the advices was to disable the class generation.

I have only 5 handlers, with 2 subdirectories (within the handlers

I've just increased the timeout to 12 minutes and now the application
It can be a coincidence that with the previous settings it always
reached the timeout when loading the handlers.

Anyway, for such a small application (we are just starting the
development: 5 handlers, 8 views en about 20 orm entities) I do not
understand why it needs so long to load. This application will be a
mid-size app with a rough estimation of 30 handlers, 50 views en 30
entities...as well as 20-30 entity services. Anybody has some
experience developing an application of that size (or bigger) ? It's
my first experience with coldfusion and coldbox, that's why I would
like to know your opinion (before I start panicking :slight_smile: )

Thanks for your help

Have you got the ORM settings in place now?

And how is that configured?

The biggest problem is that with ORM the time it takes to set that up is
also included in the page request timing, so the more directories that has
to scan and the amount of files it scans can play a major impact in the
length of time the page runs.

I am guessing at this stage that you have ORM enabled, and you also have
ColdBox in the webroot, as well you have not setup the cfclocation in the
ORM settings.

yes, coldbox is in the webroot as well as my application (under C:

This are the settings:

in Application.cfc :

this.ormEnabled = true;
this.datasource = "rica2AdHoc";
this.ormSettings = {dbcreate="none", cfclocation="model", logSQL=true,

In Coldbox.cfc this is commented:

// ORM services, injection, etc
orm = { injection = {enabled = true, include = "",exclude = ""}};

Ok, I understand the loading the entities can take some time (I guess
coldfusion is going to verify the mappings against the DB).
Is there any solution to load everything before the 1st request (to
avoid giving some kind of error to the 1st user)? or is increasing the
request timeout high enough the only solution?


Well from what you have shown me, it all looks fine. I had vision's that
maybe there was no cfclocation, which meant that the ORM was also going to
go through the ColdBox framework as well as your application.

That doesn't appear to be the case.

From your description, if you have only that many handlers it should not be
a problem. But how many ORM entities are there and do you have services
with these entities?

In this moment I have 30 entities, 27 in the root directory (model)
and 3 in a subdirectory (of model).
I have only 3 services (also as a subdirectory of model).

As I told you, we are just beginning our application. I expect to have
more handlers and services in the near future. With respect to
entities, we'll have for sure more than 30 entities...but I don't
think it'll be more than 50-60.

any ideas how to avoid the timeouts with those quantities? or how to
load the application when starting the server (instead of when sending
the 1st request)?

And it should be fine, I did a site awhile ago that had around 90 entities
and 50 services it runs fine.

Do you have server monitoring on at all?

In this moment it's disabled.

and you didn't have any problems when starting up the application in
the 1st request?
what did you set for the request timeout?

Due to debugging I have it set to 600secs, on the production server it was
set to the default 60secs.

I think there is a bottleneck somewhere.

What you could do is create an interceptor that does this, this is for
modules that I did for another site but should work fine with some

var beanFactory = getPlugin("BeanFactory");
var modules = getSetting("modules");

var interceptorPath =
replace(modules[interceptData.modulename].invocationPath & '.interceptors',
'.', '/', 'all');
var modulePath = ExpandPath(interceptorPath);

// Add the services and entities directory for the module, so we can use DI
on them.
& '.services');
& '.entities');

This will keep all the entities, models and services separated. Then change
the CFCLocation in your Application to then point to the Entities directory.

This will then keep the ORM from loading up and checking more than it has


Thanks for the tip.
I also found the setting of coldfusion 9 "onServerStart":

There a Server.cfc can be specified and executed when the server
starts up and do a ormRealod().
Of course, the problem is that this Server.cfc is common for all
applications on the server (in my case I'm not sure if I can use this
in production)

It would be ideal to have an onServerStart in the Application.cfc of
each application, but apparently it does not exist.


Wouldn't work as all Applications onServerStart will fire when the
ColdFusion server fires up.