I have a standart rails 3 webapp with the default asset pipeline. All of a sudden, the assets took a very long time to load (my page loads went to ~1-2secs to ~1min). The server response time (/home) is normal, but some .css and .js files are pending for very long (up to 45 seconds). The only few assets that take this long are those provided by gems (eg: modernizr-rails/vendor/assets/javascripts/modernizr.js
)
For example, for modernizr.js?body=1
:
Headers:
Request URL:http://dev.sharewizz.com:3000/assets/modernizr.js?body=1
Request Method:GET
Status Code:304 Not Modified
Stats:
DNS Lookup 5.00 s
Connecting 20.07 s
Sending 0
Waiting 10 ms
Receiving 3 ms
It it a problem with sprockets ? How do I know what's wrong ?
Notes: all other browsers behave the same. Edit: Actually the problem is only with chrome, not even safari.
I've tried to launch my server with rails s on port 3000 and on port 80 (no changes)
If I access http://localhost:3000/assets/modernizr.js?body=1
, most of the times it is instant, sometimes it wait for very long.