summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src
diff options
context:
space:
mode:
authorSimon Rettberg2025-07-02 14:38:48 +0200
committerSimon Rettberg2025-07-02 14:38:48 +0200
commit96b76534eed24df7db88fe88926e258c4e123a20 (patch)
treec0204d6d05db937fc2b2196b499f7cc834a23165 /dozentenmodulserver/src
parent[client] On Windows, use system certificate store in addition to Java's (diff)
downloadtutor-module-96b76534eed24df7db88fe88926e258c4e123a20.tar.gz
tutor-module-96b76534eed24df7db88fe88926e258c4e123a20.tar.xz
tutor-module-96b76534eed24df7db88fe88926e258c4e123a20.zip
[server] Lower max memory usage of thrift handling
Don't set initial buffer size to maximum allowed, also lower the maximum allowed message size.
Diffstat (limited to 'dozentenmodulserver/src')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/BinaryListener.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/BinaryListener.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/BinaryListener.java
index abf5721c..8f050c21 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/BinaryListener.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/BinaryListener.java
@@ -29,7 +29,7 @@ import org.openslx.thrifthelper.TBinaryProtocolSafe;
public class BinaryListener implements Runnable {
private static final Logger log = LogManager.getLogger(BinaryListener.class);
- private static final int MAX_MSG_LEN = 30 * 1000 * 1000;
+ private static final int MAX_MSG_LEN = 8 * 1000 * 1000;
private final SatelliteServer.Processor<ServerHandler> processor = new SatelliteServer.Processor<ServerHandler>(
new ServerHandler());
@@ -74,8 +74,8 @@ public class BinaryListener implements Runnable {
args.protocolFactory(protFactory);
args.processor(processor);
args.executorService(es);
- args.stopTimeoutVal(2).stopTimeoutUnit(TimeUnit.MINUTES);
- args.transportFactory(new TFastFramedTransport.Factory(MAX_MSG_LEN));
+ args.stopTimeoutVal(15).stopTimeoutUnit(TimeUnit.SECONDS);
+ args.transportFactory(new TFastFramedTransport.Factory(8192, MAX_MSG_LEN));
return new TThreadPoolServer(args);
}