diff --git a/web-starter/src/main/resources/application.yml b/web-starter/src/main/resources/application.yml index 5f5e85d2cb0a..bffcb51a4487 100644 --- a/web-starter/src/main/resources/application.yml +++ b/web-starter/src/main/resources/application.yml @@ -27,4 +27,11 @@ pinpoint: inspector: enabled: true realtime: - enabled: true \ No newline at end of file + enabled: true + + +pinpoint.web.websocket: + async-send-timeout: + max-session-idle-timeout: 10800000 # 3 hours + max-binary-message-buffer-size: + max-text-message-buffer-size: \ No newline at end of file diff --git a/web/src/main/java/com/navercorp/pinpoint/web/WebSocketConfig.java b/web/src/main/java/com/navercorp/pinpoint/web/WebSocketConfig.java index a84217e721f3..634bc4f644a5 100644 --- a/web/src/main/java/com/navercorp/pinpoint/web/WebSocketConfig.java +++ b/web/src/main/java/com/navercorp/pinpoint/web/WebSocketConfig.java @@ -26,11 +26,13 @@ import com.navercorp.pinpoint.web.websocket.PinpointWebSocketHandlerManager; import com.navercorp.pinpoint.web.websocket.message.PinpointWebSocketMessageConverter; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.config.annotation.EnableWebSocket; import org.springframework.web.socket.config.annotation.WebSocketConfigurer; import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory; +import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; import java.util.List; @@ -56,6 +58,12 @@ public WebSocketConfigurer webSocketConfigurer( ); } + @Bean + @ConfigurationProperties(prefix = "pinpoint.web.websocket") + public ServletServerContainerFactoryBean createWebSocketContainer() { + return new ServletServerContainerFactoryBean(); + } + @Bean public AgentService agentService(AgentInfoService agentInfoService) { return new AgentServiceImpl(agentInfoService); diff --git a/web/src/main/resources/application.yml b/web/src/main/resources/application.yml index bef2c8de83a4..8d66f9efb207 100644 --- a/web/src/main/resources/application.yml +++ b/web/src/main/resources/application.yml @@ -39,6 +39,13 @@ hbase: pinpoint.web.cache-resources: true +pinpoint.web.websocket: + async-send-timeout: + max-session-idle-timeout: 10800000 # 3 hours + max-binary-message-buffer-size: + max-text-message-buffer-size: + + --- spring.config.activate.on-profile: local pinpoint.web.cache-resources: false