docker启动java容器报错unable to allocate file descriptor table - out of memory

问题:启动java进程报错

{"log":"library initialization failed - unable to allocate file descriptor table - out of memory","stream":"stderr","time":"2024-05-15T06:27:14.681052443Z"}

原因:

LimitNOFILE=infinity 虽然是不限制,但是在systemctl版本小于234的时候不生效,查看systemctl版本:systemctl --version

解决:

# 加了--ulimit nofile=1024 
docker run -d --ulimit nofile=1024 -p 8080:8080 --name  springboot springboot-web

  

posted @ 2024-05-15 14:47  lucky_tomato  阅读(453)  评论(0编辑  收藏  举报