Update
我在index.php的开头添加了一句
ini_set("memory_limit","512M");
便能够正常生成缩略图了。不知道为什么下面这一行没有生效
'image_resize_memory_limit' => 512, // 128 MB is suffient to resize images around 6000 px / 0 = ignore memory
------------------------
在Nginx的错误日志中。似乎存在着事件的原因
但是我的服务器还有着不少内存 177 / 3946 (MB)
phpinfo里也可以看到
我完全无法理解
2021/01/25 15:07:52 [error] 31232#0: *797 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 1052672 bytes) in /www/wwwroot/134.195.88.23/index.php on line 401" while reading response header from upstream, client: 206.190.234.207, server: 134.195.88.23, request: "GET /index.php?file=ali-abdul-rahman-3kEkV4Aj0Lc-unsplash.jpg&resize=320&81df7d.1611555441.70077 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "134.195.88.23", referrer: "http://134.195.88.23/"
2021/01/25 15:07:52 [error] 31232#0: *793 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in /www/wwwroot/134.195.88.23/index.php on line 602" while reading response header from upstream, client: 206.190.234.207, server: 134.195.88.23, request: "GET /index.php?file=anna-kurguzina-rFGJKkoTFo4-unsplash.jpg&resize=320&81df7d.1611555440.111337 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "134.195.88.23", referrer: "http://134.195.88.23/"
2021/01/25 15:07:53 [error] 31232#0: *801 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 1052672 bytes) in /www/wwwroot/134.195.88.23/index.php on line 401" while reading response header from upstream, client: 206.190.234.207, server: 134.195.88.23, request: "GET /index.php?file=view.jpg&resize=320&81df7d.1611555539.76238 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "134.195.88.23", referrer: "http://134.195.88.23/"
2021/01/25 15:07:53 [error] 31232#0: *803 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 1052672 bytes) in /www/wwwroot/134.195.88.23/index.php on line 401" while reading response header from upstream, client: 206.190.234.207, server: 134.195.88.23, request: "GET /index.php?file=testimg.jpg&resize=320&81df7d.1611490118.2048211 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "134.195.88.23", referrer: "http://134.195.88.23/"
2021/01/25 15:07:53 [error] 31232#0: *805 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 1224704 bytes) in /www/wwwroot/134.195.88.23/index.php on line 401" while reading response header from upstream, client: 206.190.234.207, server: 134.195.88.23, request: "GET /index.php?file=hosea-georgeson-_8k7ZPFS4q8-unsplash.jpg&resize=320&81df7d.1611555437.152674 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "134.195.88.23", referrer: "http://134.195.88.23/"