docker Curity Identity服务器拒绝分配过多内存

wf82jlnq  于 2023-11-17  发布在  Docker
关注(0)|答案(1)|浏览(75)

我尝试使用Docker在本地机器上启动安全身份服务器。我已经遵循了他们的文档(reference),但服务器无法启动。我得到的消息如下:

2023-02-24T12:45:16:514+0000 WARN    {main} se.curity.identityserver.app.ConfDStarter - Configuration service could not be stopped (code 134)
2023-02-24T12:45:16:516+0000 INFO    {main} se.curity.identityserver.app.ConfDStarter - Configuration Service has been started.
2023-02-24T12:45:16:741+0000 WARN    {main} se.curity.identityserver.app.ConfDStarter - The Configuration Service halted unexpectedly with code 134: Unknown error See the log file '/opt/idsvr/var/log/confsvc.log' for more details
2023-02-24T12:45:16:742+0000 INFO    {main} se.curity.identityserver.app.DelegatableShutdownSwitch - Server being shutdown by switch called 'ConfDStarter'
2023-02-24T12:45:16:743+0000 WARN    {main} se.curity.identityserver.app.ConfDStarter - Will not start Configuration phase 2 because the Configuration Service did not start successfully.
2023-02-24T12:45:16:876+0000 INFO    {main} se.curity.identityserver.localization.ReloadableMessageProviderMap - Reloading messages Map
2023-02-24T12:45:16:930+0000 INFO    {main} se.curity.identityserver.app.GlobalServerShutdownSwitch - Shutdown event triggered

字符串
日志文件/opt/idsvr/var/log/confsvc.log包含以下内容:

sys_alloc: Cannot allocate 34359738368 bytes of memory (of type "db_tabs").
Daemon died status=134


这是32 GB!为什么Curity试图分配这么多内存,当minimum hardware requirements are just 4GB?
编辑:根据要求,以下是我的系统信息:

OS: Manjaro Linux x86_64
CPU: AMD Ryzen 7 2700X (16) @ 3.700GHz
GPU: AMD ATI Radeon RX 570X
Memory: 24063MiB

m4pnthwp

m4pnthwp1#

有点晚了,但是...
如果系统中的“打开文件”限制很大,CurityIdentity Server内部使用的组件之一可能会尝试在启动时分配大量内存。
似乎某些Linux发行版的Docker镜像有一个非常大的默认值。例如,我在RHEL 9的Curity容器中得到了以下内容:

> ulimit -n
1073741816

字符串
在运行Curity之前,在容器中将其设置为一个合理的值(1024是常见的默认值)应该可以解决这个问题。

相关问题