下午好!
几天来,我的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
答案 0 :(得分:3)
您可以在官方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堆大小的更多信息。
最诚挚的问候,