|
@@ -100,7 +100,7 @@ public abstract class TcpTransport extends AbstractLifecycleComponent implements
|
|
|
|
|
|
// This is the number of bytes necessary to read the message size
|
|
|
private static final int BYTES_NEEDED_FOR_MESSAGE_SIZE = TcpHeader.MARKER_BYTES_SIZE + TcpHeader.MESSAGE_LENGTH_SIZE;
|
|
|
- private static final long NINETY_PER_HEAP_SIZE = (long) (JvmInfo.jvmInfo().getMem().getHeapMax().getBytes() * 0.9);
|
|
|
+ private static final long THIRTY_PER_HEAP_SIZE = (long) (JvmInfo.jvmInfo().getMem().getHeapMax().getBytes() * 0.3);
|
|
|
private static final BytesReference EMPTY_BYTES_REFERENCE = new BytesArray(new byte[0]);
|
|
|
|
|
|
// this limit is per-address
|
|
@@ -755,9 +755,9 @@ public abstract class TcpTransport extends AbstractLifecycleComponent implements
|
|
|
throw new StreamCorruptedException("invalid data length: " + messageLength);
|
|
|
}
|
|
|
|
|
|
- if (messageLength > NINETY_PER_HEAP_SIZE) {
|
|
|
+ if (messageLength > THIRTY_PER_HEAP_SIZE) {
|
|
|
throw new IllegalArgumentException("transport content length received [" + new ByteSizeValue(messageLength) + "] exceeded ["
|
|
|
- + new ByteSizeValue(NINETY_PER_HEAP_SIZE) + "]");
|
|
|
+ + new ByteSizeValue(THIRTY_PER_HEAP_SIZE) + "]");
|
|
|
}
|
|
|
|
|
|
return messageLength;
|