48 lines
1.4 KiB
Markdown
48 lines
1.4 KiB
Markdown
|
|
# 在RockyLinux 9 下,安装Nacos docker 发生 library initialization failed - unable to allocate file descriptor table - out of memoryAborted
|
|||
|
|
|
|||
|
|
| ID | Creation Date | Assignee | Status |
|
|||
|
|
|----|----------------|----------|--------|
|
|||
|
|
| OMPUB-1326 | 2024-06-14T15:30:55.000+0800 | 张洪庆 | 已解决 |
|
|||
|
|
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
JDK 8 分配文件句柄1073741816,内存不足导致的bug,后续适配RockyLinux 9 操作系统时需要复测和优化
|
|||
|
|
临时修改了/usr/lib/systemd/system/containerd.service句柄至65535。https://blog.csdn.net/weixin_36146275/article/details/104566640**zhanghongqing** commented on *2024-11-18T18:50:13.824+0800*:
|
|||
|
|
|
|||
|
|
1. 需要docker容器内与宿主机设置文件句柄数65535保持一致,在docker启动文件中设置默认最大文件句柄数量--default-ulimit nofile=65535:65535
|
|||
|
|
!image-2024-11-18-18-33-03-333.png|width=390,height=97!
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
设置方式:修改 /usr/lib/systemd/system/docker.service 后如下:
|
|||
|
|
|
|||
|
|
|
|||
|
|
{code:java}
|
|||
|
|
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --default-ulimit nofile=65535:65535 {code}
|
|||
|
|
修改后重启docker服务生效
|
|||
|
|
systemctl daemon-reload
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
systemctl restart docker
|
|||
|
|
|
|||
|
|
2. 验证,修改后进入容器内部 docker exec -it \{CONTAINER ID} sh
|
|||
|
|
|
|||
|
|
ulimit -n 显示65535
|
|||
|
|
|
|||
|
|
3. OLAP 24.10版本后部署docker默认设置最大句柄数65535
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Attachments
|
|||
|
|
|
|||
|
|
**66251/image-2024-11-18-18-33-03-333.png**
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|