Ruby on rails can';t将高分辨率图像上载到生产中,但日志中未显示任何内容
有一个Rails应用程序。 所有基本材料:Carrierwave等 还有一个生产服务器。普通的Ubuntu,有独角兽 试图将高分辨率图像(如10Mb JPG)上传到生产环境中,但这不起作用。错误Ruby on rails can';t将高分辨率图像上载到生产中,但日志中未显示任何内容,ruby-on-rails,Ruby On Rails,有一个Rails应用程序。 所有基本材料:Carrierwave等 还有一个生产服务器。普通的Ubuntu,有独角兽 试图将高分辨率图像(如10Mb JPG)上传到生产环境中,但这不起作用。错误出了问题()。但在任何日志中都没有显示错误。就像字面上说的,到处都说一切都很好 但无法在本地主机上重现此问题。换句话说,它可以在本地主机上工作,只需使用任意大小的图像即可 有人知道我能做些什么来修复它吗 编辑: 这里是nginx.conf client_body_in_file_only cle
出了问题()。但在任何日志中都没有显示错误。就像字面上说的,到处都说一切都很好
但无法在本地主机上重现此问题。换句话说,它可以在本地主机上工作,只需使用任意大小的图像即可
有人知道我能做些什么来修复它吗
编辑:
这里是nginx.conf
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 300M;
sendfile on;
send_timeout 300s;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
站点\u可用
:
服务器{
听起来像是一个client_max_body_size
问题。由于nginx.conf中的默认值为1m
:client_max_body_size 300M;您是否可以检查可用的站点
并查看是否没有其他内容覆盖它?client_max_body_size 4G;可能是超时问题?如果您增加超时会发生什么?
listen 80;
server_name devruck.us *.devruck.us;
root /home/ruckus/apps/devruck.us/public;
location ^~ /assets/ {
if ($request_filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
add_header Access-Control-Allow-Origin *;
}
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn_staging_ruckus;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}