I have installed cache-header (1.0.4) and cached-resources (1.0) in our grails application and once in a while we receive messages like the one below.
Do you have any clue on why do we get those messages and how can we fix it?
Regards
2013-09-24 04:21:34,561 [catalina-exec-2] ERROR resource.ResourceMeta - CENTRALLEAD - Resource not found: /LNEjLROINsk9TKAzkAwtTxIXru6CyGZP4s5w1mybXkD.js
2013-09-24 04:21:30,030 [catalina-exec-5] ERROR resource.ResourceMeta - CENTRALLEAD - Resource not found: /ZCCuNwL3Y8SsQanoiqrQWpsP4q9q7JN3IDqeB4FsIve.css
My configuration looks like:
////////////////////////////////////////////////////////
/////// Resources
////////////////////////////////////////////////////////
// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = [
'/images/*',
'/css/*',
'/js/*',
'/plugins/*'
]
EDITED
There is something really weird. The image that we most get the error is: http://bemdireto.com.br/static/BkSQHPEr6mihRHkVPfr5gl9Dkq02wsucDobLXxgHaao.jpg
we have also set at the config:
grails.resources.work.dir = "/www/logs/tmp/centrallead"
and the image is present at that folder
We hava a load balancer and the image is present in all servers
It can be the resources work dir that was cleaned up, or a wrong cache. Normally when I use the cached-resources I do the following (in Config.groovy):
grails.resources.debug=true
: only for development mode. With that you will avoid weird cache issues when changing a lot your files during the developmentgrails.resources.work.dir
: Define a fixed directory for the temporary files. This is important in production, and will evict this errors of resource not found, because the default is the temporary folder of your container, and it can be cleaned by the container.