首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >运行eclipse-temurin时“内存不足”:17-jdk Docker映像

运行eclipse-temurin时“内存不足”:17-jdk Docker映像
EN

Stack Overflow用户
提问于 2022-11-15 10:19:03
回答 1查看 153关注 0票数 -1

在运行./mvnw clean package映像的Docker容器中运行eclipse-temurin:17-jdk命令时,我得到了以下错误(Maven甚至没有执行):

代码语言:javascript
运行
复制
[0.002s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# /home/myuser/hs_err_pid8.log

hs_err_pid8.log文件中有更多信息:

代码语言:javascript
运行
复制
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
#   JVM is running with Zero Based Compressed Oops mode in which the Java heap is
#     placed in the first 32GB address space. The Java Heap base address is the
#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
#     to set the Java Heap base and to place the Java Heap above 32GB virtual address.
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (workerManager.hpp:87), pid=8, tid=8
#
# JRE version:  (17.0.5+8) (build )
# Java VM: OpenJDK 64-Bit Server VM (17.0.5+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

我怎么才能解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2022-11-15 10:19:03

--security-opt seccomp=unconfined参数添加到docker run命令中解决了我的问题。

多亏了这个所以回答,它指出了seccomp Docker安全配置文件& 正式文件

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74443957

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档