日志报错信息:2024-05-11 10:33:35 pid:5011 Worker[5011] process terminated with ERROR: E_ERROR "Allowed memory size of 549453824 bytes exhausted (tried to allocate 40960 bytes) in /code/ticket/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php on line 154"
上传文件多大?
运行
composer info | grep image
看下intervention/image
版本?运行系统环境?是否用了docker?
文件大小 872kb, 系统环境用的是vagrant , intervention/image版本 2.7.2,老大 我把memory_limit设置成-1 就不报错了,但是设置成-1 这不安全啊, 求老大解答疑惑
日志报错信息:2024-05-11 10:33:35 pid:5011 Worker[5011] process terminated with ERROR: E_ERROR "Allowed memory size of 549453824 bytes exhausted (tried to allocate 40960 bytes) in /code/ticket/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php on line 154"
一个872kb的文件报错?还是说你是批量处理上传的文件?
之前有人反馈过,在docker容器里使用 intervention/image 时占用内存异常,实体机没问题。
https://www.workerman.net/q/11459