Copy link to clipboard
Copied
I've created a rest API in ColdFusion 2016. The first time a request is made to the API in the morning will generate an error:
Application (myapp) could not be found. The specific sequence of files included or processed is: ''
All subsequent requests to the API go through without errors after that. Any idea why I am getting this error?
Could it then be that this.applicationTimeout (in Application.cfc) is set to 1 day or less? If so, then the error suggests that the application had not fully started before the Rest API started.
You could then solve this by
Copy link to clipboard
Copied
Could it then be that this.applicationTimeout (in Application.cfc) is set to 1 day or less? If so, then the error suggests that the application had not fully started before the Rest API started.
You could then solve this by
Copy link to clipboard
Copied
Any news, @Malcom Rynolds ?
Copy link to clipboard
Copied
Thank you for the response. Application timeout is not set. I've set it to 1 day and 12 hours. We'll see what happens. Seems very hard to test this since it only happens first time in the morning. I wonder if the server is being rebooted over night and it is the first time a rest service is called.
Copy link to clipboard
Copied
Please confirm that "myapp" is tha value of this.name in Application.cfc.
Yet another idea: open the ColdFusion Administrator. Go to the page Data & Services > REST Services.
You should see a row corresponding to the REST service. Press the button to refresh the service:
Copy link to clipboard
Copied
This morning I did not receive the error. Perhaps it was related to there being no value for applicationTimeout or that we just haven't reached the timeout period yet since it is longer than a day now.
this.name was also not set. I've set it now. I have refereshed the service in CF admin as you indicated. I have to do this any time I make a change to application.cfc or any of the API files for that matter. Still no initial error.
Copy link to clipboard
Copied
I am glad to hear that you're no longer gettting any initial errors. Give it a few days before marking this thread as answered.