报错 无法创建线程
unable to create new native thread
可通过top -H -p pid查看线程数
原因:用户的进程数是有限制的 ulimit -u可查看
jstack查看进程状态,如果有大量进程是WAITING,则可能有线程泄露
典型代码:
创建了excutor但是没有关闭shutdown
ScheduledThreadPoolExcutor excutor = new ScheduledThreadPoolExcutor();
excutor.excute();