add simpler way to set the epoll bug workaround flag for netty
This commit is contained in:
parent
f73d684c76
commit
df0ff176d4
|
@ -112,6 +112,11 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent<HttpSer
|
||||||
public NettyHttpServerTransport(Settings settings, NetworkService networkService) {
|
public NettyHttpServerTransport(Settings settings, NetworkService networkService) {
|
||||||
super(settings);
|
super(settings);
|
||||||
this.networkService = networkService;
|
this.networkService = networkService;
|
||||||
|
|
||||||
|
if (settings.getAsBoolean("netty.epollBugWorkaround", false)) {
|
||||||
|
System.setProperty("org.jboss.netty.epollBugWorkaround", "true");
|
||||||
|
}
|
||||||
|
|
||||||
ByteSizeValue maxContentLength = componentSettings.getAsBytesSize("max_content_length", settings.getAsBytesSize("http.max_content_length", new ByteSizeValue(100, ByteSizeUnit.MB)));
|
ByteSizeValue maxContentLength = componentSettings.getAsBytesSize("max_content_length", settings.getAsBytesSize("http.max_content_length", new ByteSizeValue(100, ByteSizeUnit.MB)));
|
||||||
this.maxChunkSize = componentSettings.getAsBytesSize("max_chunk_size", settings.getAsBytesSize("http.max_chunk_size", new ByteSizeValue(8, ByteSizeUnit.KB)));
|
this.maxChunkSize = componentSettings.getAsBytesSize("max_chunk_size", settings.getAsBytesSize("http.max_chunk_size", new ByteSizeValue(8, ByteSizeUnit.KB)));
|
||||||
this.maxHeaderSize = componentSettings.getAsBytesSize("max_header_size", settings.getAsBytesSize("http.max_header_size", new ByteSizeValue(8, ByteSizeUnit.KB)));
|
this.maxHeaderSize = componentSettings.getAsBytesSize("max_header_size", settings.getAsBytesSize("http.max_header_size", new ByteSizeValue(8, ByteSizeUnit.KB)));
|
||||||
|
|
|
@ -163,6 +163,10 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
||||||
this.threadPool = threadPool;
|
this.threadPool = threadPool;
|
||||||
this.networkService = networkService;
|
this.networkService = networkService;
|
||||||
|
|
||||||
|
if (settings.getAsBoolean("netty.epollBugWorkaround", false)) {
|
||||||
|
System.setProperty("org.jboss.netty.epollBugWorkaround", "true");
|
||||||
|
}
|
||||||
|
|
||||||
this.connectMutex = new Object[500];
|
this.connectMutex = new Object[500];
|
||||||
for (int i = 0; i < connectMutex.length; i++) {
|
for (int i = 0; i < connectMutex.length; i++) {
|
||||||
connectMutex[i] = new Object();
|
connectMutex[i] = new Object();
|
||||||
|
|
Loading…
Reference in New Issue