The Miniprofiler gem for rails is very handy. (github, railscast)
However, I am getting a lot of 404 errors in my application:
In the chrome console, tab network:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost.mysite.com/mini-profiler-resources/results
This page returns the following response: Request not found: - user 127.0.0.1
On every page, I have 9 of those requests. (so it clogs my logs, and it's annoying). And 9 more show up every time I trigger an ajax request.
It seems that mini profiler is trying to evaluate the time of a request that doesn't happen... How can I troubleshoot this situation ?
Update: I've noticed that this gem also make the loading of images very slow. The images have a pending time (in the network tab) that ranges from 1 to 20 seconds, then they are loaded. Visually, you see images popping one after another very slowly.
I've tried to fiddle with the development.rb config settings (config.consider_all_requests_local
, config.assets.debug
, config.cache_classes
, and config.assets.compress
) without success. I have also tried to change my domain (dev.mysite.com with entry in /etc/hosts
, localhost, 127.0.0.1 and localhost:3000). In every case, the gem makes image loading very slow. If I remove the gem, it's fast again.
Update 2: Sometimes (and I still don't know why), images load fast even with the gem after restarting the server. So the situation is like this:
- Miniprofiler included in gemfile => 404 errors, images load slowly 90% of the time
- Miniprofile not included in gemfile => No 404 errors, images load normally