Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Refile Rails gem慢速加载直接URL_Ruby On Rails_Ruby_Ruby On Rails 4_Heroku_Refile - Fatal编程技术网

Ruby on rails Refile Rails gem慢速加载直接URL

Ruby on rails Refile Rails gem慢速加载直接URL,ruby-on-rails,ruby,ruby-on-rails-4,heroku,refile,Ruby On Rails,Ruby,Ruby On Rails 4,Heroku,Refile,我正在使用Refile为我的Rails 4.2.5应用程序上载和提供图像,使用Cloudfront将直接URL加载到图像非常缓慢。Heroku不断向我发送通知,告知从route/attachments加载的每个图像的加载时间都比平时长 我已经设置了Cloudfront来提供图像,他们正在返回图像。唯一的问题是,当我使用Refile生成URL时,我使用以下内容: High Response Time: Heroku/wearaway-api-prod 2016-05-16 16:22:06.92

我正在使用Refile为我的Rails 4.2.5应用程序上载和提供图像,使用Cloudfront将直接URL加载到图像非常缓慢。Heroku不断向我发送通知,告知从route
/attachments
加载的每个图像的加载时间都比平时长

我已经设置了Cloudfront来提供图像,他们正在返回图像。唯一的问题是,当我使用Refile生成URL时,我使用以下内容:

High Response Time: Heroku/wearaway-api-prod

2016-05-16 16:22:06.926
433 <158>1 2016-05-16T16:22:06.760520+00:00 heroku router - - at=info method=GET 
path="/attachments/abe2ab1fb2d141822e23f3a7f5e7e793ade6c6c8/store/fill/400/400/a248e0ab9ea3ec1adcaf1c9a01a1f0e42cd4f57c21190a7965942a8156fb/image.jpg" 
request_id=e343cc17-e4ea-4509-9f89-5b4b46ebd6f0 fwd="198.84.238.143,54.182.212.44" dyno=web.1 connect=0ms service=5928ms status=200 bytes=80505
附件\u url(对象:图像:填充,400400,格式:“jpg”)

在我的product_序列化程序中调用它,通过JSON返回URL。然后我的Angular2应用程序使用该URL将图像发送到前端。每次我点击端点获取产品的详细信息时,我都会收到Heroku的通知,通知内容如下:

High Response Time: Heroku/wearaway-api-prod

2016-05-16 16:22:06.926
433 <158>1 2016-05-16T16:22:06.760520+00:00 heroku router - - at=info method=GET 
path="/attachments/abe2ab1fb2d141822e23f3a7f5e7e793ade6c6c8/store/fill/400/400/a248e0ab9ea3ec1adcaf1c9a01a1f0e42cd4f57c21190a7965942a8156fb/image.jpg" 
request_id=e343cc17-e4ea-4509-9f89-5b4b46ebd6f0 fwd="198.84.238.143,54.182.212.44" dyno=web.1 connect=0ms service=5928ms status=200 bytes=80505
高响应时间:Heroku/wearaway api产品
2016-05-16 16:22:06.926
4331 2016-05-16T16:22:06.760520+00:00 heroku路由器--at=info方法=GET
path=“/attachments/abe2ab1fb2d141822e23f3a7f5e7e793ade6c6c6c8/store/fill/400/400/a248e0ab9ea3ec1adcaf1c9a01a1f0e42c4f57c2190a795942a8156fb/image.jpg”
请求id=e343cc17-e4ea-4509-9f89-5b4b46ebd6f0 fwd=“198.84.238.143,54.182.212.44”dyno=web.1 connect=0ms服务=5928ms状态=200字节=80505
有人知道如何提高检索图像URL的速度吗?我可能错过了什么。谢谢