标签为 "not work" 的存档

怎么修改ulimit,开启php的coredump输出

大家应该都知道,开启php的coredump输出,修改ulimit -c就可以了,但是很多情况下,会提示权利受限,无法修改

[fukun@10.16.29.xxx]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 30678
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 32768
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

$ ulimit -c unlimited
-bash: ulimit: core file size: cannot modify limit: Operation not permitted

解决方案:
1.检查配置
看看shell配置里有没有 ulimit -c 0 这种类似的关闭的操作,例如 $HOME/.bash_profile 或者 $HOME/.bashrc 之类的,如果有,注释掉。

#
# Do not produce core dumps
#
# ulimit -c 0

Read more…