php写了个upload,在大文件的时候经常失败,某些项目还是nginx+fpm的通讯
排查之后,几个关键点配置
nginx相关
与php fpm相关
fastcgi_connect_timeout 6000;
fastcgi_send_timeout 6000;
fastcgi_read_timeout 6000;
fastcgi_buffer_size 256k;
fastcgi_buffers 8 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
非fpm相关
proxy_connect_timeout 60s;
proxy_read_timeout 1m;
proxy_send_timeout 1m;
客户端与nginx连通
keepalive_timeout 100;
client_max_body_size 1000m;
client_header_timeout 1m;
client_body_timeout 1m;
php相关
配置
cat > docker-php-ext-php.ini <<hh
upload_max_filesize = 1000M
post_max_size=1000M
hh
附
cat写入方法方式
cat向文件中写入内容
写入:
cat > test.txt <
hh
追加:
cat >> test.txt <<hh
hello world
hh
参考链接
https://blog.csdn.net/joeyon1985/article/details/50036095
https://www.cnblogs.com/kevingrace/p/6093671.html