PHP进程高负载

关于PHP进程高负载的情况,我检查了Linux的message log文件,发现了以下的错误信息,

1 ALERT --- script tried to increase memory_limit to 3170893824 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '/aaa/bbb/ccc_ccc_ccc/api_ccc_ccc.php', line 7)


原因是:suhosin的memory_limit限制了脚本内存的分配。

解决方法是:

使用ps -aux  | grep  php命令,kill掉高负载的进程, 同时加大suhosin配置文件里的suhosin.memory_limit设置,同时在php.ini文件中,将memory_limit改成suhosin.memory_limit的值一致,当然需要在server有足够内存的前提下。

原文地址:https://www.cnblogs.com/droko/p/2381966.html