Skip to content

Commit 6e7e7d7

Browse files
committed
Use the default values for input/output buffers
Before it was using a buffer of 8Mb. This meant that for every message received/sent, a buffer of 8Mb was being allocated. This in turn were causing a log of memory pressure and the service would crash with Out of Memory. After this change, the IO buffers have a 4Kb size that doesn't create the same memory pressure. Even if the buffer is only 4Kb, it still works for messages that are bigger than 4Kb.
1 parent 600df0e commit 6e7e7d7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/main/java/de/rwth/idsg/steve/SteveAppContext.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public HandlerCollection getHandlers() {
8080
*/
8181
public void configureWebSocket() {
8282
JettyWebSocketServerContainer container = JettyWebSocketServerContainer.getContainer(webAppContext.getServletContext());
83-
container.setInputBufferSize(MAX_MSG_SIZE);
84-
container.setOutputBufferSize(MAX_MSG_SIZE);
8583
container.setMaxTextMessageSize(MAX_MSG_SIZE);
8684
container.setIdleTimeout(IDLE_TIMEOUT);
8785
}

0 commit comments

Comments
 (0)