gpt4 book ai didi

java - 如何增加 Cygnus 的 Java 堆空间?

转载 作者:行者123 更新时间:2023-11-29 04:20:45 25 4
gpt4 key购买 nike

下午好!

几天来,我的 cygnus 代理返回了我附加的以下日志,我该如何增加为此进程分配给 Java 的内存?非常感谢大家!

time=2018-03-16T12:02:53.282Z | lvl=ERROR | corr=05e3c64e-2908-11e8-8967-fa163e33d403 | trans=b8f80c9f-b321-4d6b-bfd6-2e846cc2fd7c | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:02:19.216Z | lvl=INFO | corr=1492a660-2908-11e8-a3e9-fa163e33d403 | trans=a5a375f2-23f1-4d52-b86e-036b066b2306 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (a5a375f2-23f1-4d52-b86e-036b066b2306)
time=2018-03-16T12:02:19.038Z | lvl=ERROR | corr=05498d04-2908-11e8-91c3-fa163e33d403 | trans=79acff3b-af66-4a30-ba0a-6f2d1702c50f | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:02:12.637Z | lvl=ERROR | corr=02148a58-2908-11e8-83b6-fa163e33d403 | trans=68772803-ae98-481e-844c-26fef99c33cb | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:02:12.458Z | lvl=ERROR | corr=06708caa-2908-11e8-ba44-fa163e33d403 | trans=8e9d7e35-82d4-4b1c-9ad9-49c67d0172a1 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:02:12.281Z | lvl=ERROR | corr=076b4b7c-2908-11e8-9150-fa163e33d403 | trans=67284db2-9814-4d22-8238-d8258d05581b | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:02:07.557Z | lvl=INFO | corr=14519116-2908-11e8-a7ac-fa163e33d403 | trans=621e2e69-d244-4ef9-930e-c70e8b9fd7ca | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (621e2e69-d244-4ef9-930e-c70e8b9fd7ca)
time=2018-03-16T12:02:07.380Z | lvl=ERROR | corr=13a7f7b4-2908-11e8-b59b-fa163e33d403 | trans=8bfe2de9-d681-44f5-9847-24a5388ee6bf | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:01:54.904Z | lvl=INFO | corr=12c9a0ae-2908-11e8-9994-fa163e33d403 | trans=ed8ea56a-3d5b-4511-aefd-12443f38301e | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (ed8ea56a-3d5b-4511-aefd-12443f38301e)
time=2018-03-16T12:01:54.724Z | lvl=INFO | corr=123b73e2-2908-11e8-948c-fa163e33d403 | trans=c4fbff8e-5a3f-402d-831b-2c27ab5caa53 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (c4fbff8e-5a3f-402d-831b-2c27ab5caa53)
time=2018-03-16T12:01:54.601Z | lvl=INFO | corr=11e01416-2908-11e8-b801-fa163e33d403 | trans=7b1b4ef0-2fb1-4c4f-b18f-c807d6ad696c | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (7b1b4ef0-2fb1-4c4f-b18f-c807d6ad696c)
time=2018-03-16T12:01:54.601Z | lvl=INFO | corr=11a0e28c-2908-11e8-aae7-fa163e33d403 | trans=17ff5f1a-08a6-4ce2-8993-893e055e99d8 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=getEvents | msg=com.telefonica.iot.cygnus.handlers.NGSIRestHandler[286] : [NGSIRestHandler] Starting internal transaction (17ff5f1a-08a6-4ce2-8993-893e055e99d8)
time=2018-03-16T12:01:54.601Z | lvl=ERROR | corr=11614b40-2908-11e8-831d-fa163e33d403 | trans=d0c68e25-4e53-4557-9eb5-2a3d5f6b5407 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:01:38.801Z | lvl=ERROR | corr=099ffaa0-2908-11e8-bfd9-fa163e33d403 | trans=d0225044-f783-4570-923b-bf519d9615fc | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:01:38.563Z | lvl=ERROR | corr=091bcd70-2908-11e8-832a-fa163e33d403 | trans=e645e877-a131-4075-9372-f4553bb9ce25 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:01:38.324Z | lvl=ERROR | corr=0a50cd3a-2908-11e8-82ae-fa163e33d403 | trans=231ec951-9da8-4a52-81de-65cdbc57e98e | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space
time=2018-03-16T12:01:38.081Z | lvl=ERROR | corr=0abdb2e2-2908-11e8-8b29-fa163e33d403 | trans=fac8385f-79fa-464a-9b62-0e035c3f9c54 | srv=default | subsrv=/sevilla | comp=cygnus-ngsi | op=warn | msg=org.mortbay.log.Slf4jLog[87] : Error for /notify
java.lang.OutOfMemoryError: Java heap space

最佳答案

可以在官方找到Cygnus Documentation how to configure Flume env variables in where you can increase your JAVA Heap size .您也可以使用此命令 $ export JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m" 其中 512m 表示您要管理的内存量(以兆字节为单位),但是您可以设置堆全局大小,这意味着您为所有应用程序设置该值。

另一种选择是使用此命令 java -jar -Xms512m -Xmx6144m pathToJarFile.jar 并将 pathToJarFile.jar 替换为安装 cygnus jar 的路径。

如果您想在 this link are some summarized information about it 中了解有关 Java 堆大小的更多信息.

最好的问候,

关于java - 如何增加 Cygnus 的 Java 堆空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49321333/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com