更改Linux默认栈空间的大小 cannot modify limit: Operation not permitted

cannot modify limit: Operation not permitted

ulimit -c unlimited
ulimit -s 102400

bash: ulimit: core file size: cannot modify limit: Operation not permitted
I also tried setting ulimit to 50000 and still got the same error.
$ 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) 12275
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
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

在/etc/security/limits.conf  加入  * soft stack 102400

改完之后重新登录就行

https://cloud.tencent.com/developer/article/1184189
https://superuser.com/questions/79717/bash-ulimit-core-file-size-cannot-modify-limit-operation-not-permitted

posted @ 2023-01-05 18:52  michaelchengjl  阅读(453)  评论(0编辑  收藏  举报