Wowza Community

AMF3Utils.deserializeInt: java.nio.BufferUnderflowException

Hi,

I encountered the error sporadically on Wowza server. I noticed this error keeps repeating till I restart the server and blocks other clients trying to connect . Are there any specific cases when this will occur?

ERROR server comment 2010-03-22 19:32:36 - - - - - 378447.058 - - - - - - - AMF3Utils.deserializeInt: java.nio.BufferUnderflowException

ERROR server comment 2010-03-22 19:32:36 - - - - - 378447.058 - - - - - - - constructor AMFDataObj(ByteBuffer): java.nio.BufferUnderflowException

ERROR server comment 2010-03-22 19:32:36 - - - - - 378447.058 - - - - - - - position: 159

ERROR server comment 2010-03-22 19:32:36 - - - - - 378447.058 - - - - - - - limit: 159

ERROR server comment 2010-03-22 19:32:36 - - - - - 378447.058 - - - - - - - data

11 0a 0b 01 07 73 69 64 05 40 3a 00 00 00 00 00 …sid .@:…

00 15 61 63 74 69 6f 6e 54 79 70 65 05 40 08 00 …action Type.@…

00 00 00 00 00 11 63 72 65 61 74 65 54 43 06 0d …cr eateTC…

35 31 35 37 35 30 03 70 05 40 00 00 00 00 00 00 515750.p .@…

00 17 69 6e 69 74 69 61 6c 44 61 74 61 0a 0b 01 …initia lData…

00 05 40 3a 00 00 00 00 00 00 05 74 70 05 40 26 …@:… …tp.@&

00 00 00 00 00 00 03 78 05 40 78 e0 00 00 00 00 …x .@x?..

00 03 79 05 40 69 c0 00 00 00 00 00 05 77 69 05 …y.@i?. …wi.

00 00 00 00 00 00 00 00 05 68 69 05 00 00 00 00 … .hi…

00 00 00 00 05 73 6e 06 05 74 63 06 06 01 01 …sn. .tc…

This can happen if the server is not tuned properly. Follow the tuning guide:

https://www.wowza.com/docs/how-to-do-performance-tuning

Richard

What volume of streams are you testing? Xmx768M is not a lot of memory.

Charlie

The error happens because of long GC pauses that cause transmission problems. So the error is due to the TCP connection becoming out of sync. Crank up the heap size. 768M is way, way, way to low for 600Mbps of transmission. Go with 64-bit OS and VM and move to 3000-4000M heap.

Charlie

It sounds like the so is corrupt. That is the most likely explenation.

Charlie

Hi,

Thank you for the reply.

I checked configuration flow, and i tryed to repro the same issue using these setting changes. I got only OutOfMemoryError.

ERROR server comment 2010-03-25 06:05:47 - - - 455.784 invoke(onAppStart): java.lang.OutOfMemoryError: Java heap space: java.lang.StringCoding$StringEncoder.encode(StringCoding.java:232) - - - - - - - - - - - -

My current settings

[install-dir]/bin/setenv.bat (Windows)

set JAVA_OPTS=-Xmx768M

[install-dir]/bin/WowzaMediaServer-Service.conf (Windows)

wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"

[install-dir]/conf/VHost.xml

<ReceiveBufferSize>65000</ReceiveBufferSize>
<SendBufferSize>24000</SendBufferSize>

If i made any misstake on code, please give the solution

The wowza server would be handling close to 600Mb of data (max) for an hour. Our earlier heap size was 768M.

But we noticed the error in the first post sporadically and based on the suggestion made for that post, we tried to bring down the heap size and buffer size, to reproduce the issue, but were not successful.

Can you let us know more specifically when the BufferUnderFlowException under the deserializeInt code would occur?

We recently noticed, that we get the above mentioned error, when reading some particular slots from an RSO. It happens when we do a sharedObjects.load() on the rso directory where this RSO resides.

Any pointers on when we would notice such an error when reading data from an RSO?

Thanks in advance,