unable to create new native thread&You have mail in /var/spool/mail/root

1.linux下普通用户java.lang.OutOfMemoryError: unable to create new native thread。详情可以google。

调整的方法有不少,这里选用其中一种,修改linux的用户环境变量文件:

vim /etc/profile
在最后一行添加以下内容:
    ulimit -u 10000
    ulimit -n 4096
    ulimit -d unlimited
    ulimit -m unlimited
    ulimit -s unlimited
    ulimit -t unlimited
    ulimit -v unlimited

记得要使环境变量生效:source /etc/proflie

2.You have mail in /var/spool/mail/root问题,每次执行命令的时候都有下面的提示。详情可以google。

解决方法:

vim /etc/profile
在最后一行添加以下内容:
    unset MAILCHECK

记得要使环境变量生效:source /etc/proflie

原文地址:https://www.cnblogs.com/wyl9527/p/6633057.html