我在laravel项目中工作,我的表单是用ajax提交的, 目标是使用数据用户输入创建具有“intervation图像”的图像。
实际上,如果我的代码要创建30个图像需要大约20/40秒,但如果我想要创建100个或更多图像,它会停止并返回错误:
404 Not Found
nginx/1.10.0 (Ubuntu)
我认为这是由于php的时间限制,所以我增加了限制:
资源限制
max_execution_time = 120
max_input_time = 120
memory_limit = 128M
错误日志
2017/06/21 08:39:44 [error] 2438#2438: *765 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 84.220.145.34, server: dixart.it, request: "POST /tool/postFinal HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock", host: "www.dixart.it", referrer: "http://www.dixart.it/tool"
2017/06/21 08:39:44 [error] 2438#2438: *765 open() "/usr/share/nginx/html/50x.html" failed (2: No such file or directory), client: 84.220.145.34, server: dixart.it, request: "POST /tool/postFinal HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock", host: "www.dixart.it", referrer: "http://www.dixart.it/tool"
访问日志
84.220.145.34 - - [21/Jun/2017:08:38:30 +0000] "POST /tool/upload/image HTTP/1.1" 200 67 "http://www.dixart.it/tool" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
84.220.145.34 - - [21/Jun/2017:08:39:44 +0000] "POST /tool/postFinal HTTP/1.1" 404 209 "http://www.dixart.it/tool" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"