Caused by: java.lang.OutOfMemoryError: Java heap space

Warfunck

New Member
Добрый день, вновь упали все стримы с ошибкой:

19:33:51,118 WARN annelUpstreamHandler - pool-194-thread-1 EXCEPTION, please implement com.flashphoner.D.B.exceptionCaught() for proper handling.
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.flashphoner.server.client.handler.MediaHandlerProxyCreator$MediaHandlerInvocationHandler.invoke(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.WCS4Handler_$$_jvst8c0_0.playAudioRtpPacket(WCS4Handler_$$_jvst8c0_0.java)
at com.flashphoner.server.remote.E.D.A(Unknown Source)
at com.flashphoner.D.B.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.jboss.netty.buffer.HeapChannelBuffer.<init>(Unknown Source)
at org.jboss.netty.buffer.BigEndianHeapChannelBuffer.<init>(Unknown Source)
at org.jboss.netty.buffer.ChannelBuffers.buffer(Unknown Source)
at org.jboss.netty.buffer.HeapChannelBufferFactory.getBuffer(Unknown Source)
at org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(Unknown Source)
at org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes(Unknown Source)
at org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(Unknown Source)
at org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(Unknown Source)
at com.flashphoner.media.E.A.A.A(Unknown Source)
at com.flashphoner.media.E.A.A.B(Unknown Source)
at com.flashphoner.media.E.A.A.C(Unknown Source)
at com.flashphoner.media.E.N.l(Unknown Source)
at com.flashphoner.media.E.N.A(Unknown Source)
at com.flashphoner.A.E.D.A(Unknown Source)
at com.flashphoner.A.E.D.dataPacketReceived(Unknown Source)
at com.flashphoner.A.E.I.B(Unknown Source)
at com.flashphoner.A.E.I.dataPacketReceived(Unknown Source)
at com.flashphoner.media.B.D.insertRtpPacket(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.media.MediaHandler.playAudioRtpPacket(Unknown Source)
at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.flashphoner.server.client.handler.MediaHandlerProxyCreator$MediaHandlerInvocationHandler.invoke(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.WCS4Handler_$$_jvst8c0_0.playAudioRtpPacket(WCS4Handler_$$_jvst8c0_0.java)
at com.flashphoner.server.remote.E.D.A(Unknown Source)
at com.flashphoner.D.B.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)

Можно ли подтюнить WCS, чтобы такого не повторялось?
 

Max

Administrator
Staff member
Добрый день.
Если сервер выходит по java.lang.OutOfMemoryError: Java heap space, то, скорее всего, ему не хватает памяти, выделенной для Java heap (по умолчанию 1 Гб).
При стриминге в памяти создается и уничтожается много объектов с данными. Поэтому рекомендуется выделять под Java memory heap не менее, чем 1/2 физической памяти сервера. Например, если объем оперативной памяти сервера составляет 32 Гб, рекомендуется выделить 16 Гб при помощи следующих настроек в файле /usr/local/FlashphonerWebCallServer/conf/wcs-core.properties
Code:
-Xmx16g
-Xms16g
Особенности настройки Java heap и Garbage Collector (при использовании CMS и ZGC) описаны здесь.
 
Top