当我尝试上传25.5mb文件时收到错误Rack app error: #<RegexpError: failed to allocate memory: /\A[^%]*(?:%\h\h[^%]*)*\z/>
。文件上传为base64编码数据。 Puma日志中会出现此错误。
nginx config:
upstream tgmu {
server unix:///home/railsuser/eis/shared/tmp/sockets/puma.sock;
}
server {
listen 80;
client_max_body_size 100m;
root /home/railsuser/eis/current/public;
server_name xxx;
location / {
proxy_pass http://tgmu;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
如何解决这个问题?