restcoldfusioncoldfusion-11

Coldfusion 11 REST API service seems to stop working unexpectedly


My client uses a Windows Server 2012 R2 standard OS running IIS and Coldfusion 11. I have created a REST API service through CF Admin. I understand that the API needs a manual refresh every time I make a change in any of CFCs inside the registered API service folder. But sometimes, the API apparently seems to stop working and returns 404 errors even when nobody has made any changes to it.

I read this old thread where it says: https://forums.adobe.com/thread/1487200

following situations also break a service

  • "clear template cache" button in administrator

  • restart of server

I restarted the CF service on my localhost and it does not break the service although my machine is running CF10 and Apache and the client's server is running CF11 on IIS. Could there be a different behaviour on the server because of these differences, I mean could the CF11 REST API services need a refresh after server or CF service restarts? I can't really restart CF server on the prod server to test this.

I also read in the below thread that the clear template cache issue would be resolved in an update to CF10 and CF11. https://tracker.adobe.com/#/view/CF-3850183

How do I check whether the CF11 instance on my client's server has this update or not?

Are there any other reasons that can cause the service to go down? If I can find out what exactly is causing the service to go down, I can most probably devise a way to refresh the service automatically.

Thanks.

UPDATE

This happened again on the prod server and I managed to grab hold of the logs. This is what the application.log and exception.log say:

"Error","ajp-bio-8014-exec-210","03/30/17","09:16:12",,"The application api2 is modified and not refreshed.Refresh the application. The specific sequence of files included or processed is: C:\foo\bar\baz.cfc'' "

I checked the file baz.cfc and it has not been modified. It was last modified several days ago.


Solution

  • Thanks to @Miguel-F's suggestions, I updated Coldfusion and that has resolved this issue.

    The issue was being caused by a bug in Coldfusion where if any of the service components were removed from the template cache, then the API stopped responding and logged the below message:

    The application api2 is modified and not refreshed.Refresh the application. The specific sequence of files included or processed is: C:\foo\bar\baz.cfc'

    You can recreate this issue by using the Clear template cache button in CF admin.

    I updated CF10 to update22 and CF11 to update 11 and the issue hasn't occurred since :).