diff --git a/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebSocketProperties.kt b/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebSocketProperties.kt index 79fe623d87..3972c60e3c 100644 --- a/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebSocketProperties.kt +++ b/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebSocketProperties.kt @@ -33,5 +33,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties data class WebSocketProperties( var cacheLimit: Int = 3600, var minThread: Int = 8, - var transfer: Boolean = false + var transfer: Boolean = false, + var messageSizeLimit: Int = 8*1024*1024, + var sendTimeLimit: Int = 10*1000, + var sendBufferSizeLimit: Int = 1024*1024, ) diff --git a/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebsocketConfiguration.kt b/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebsocketConfiguration.kt index 16717a366c..d6aa45e172 100644 --- a/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebsocketConfiguration.kt +++ b/src/backend/websocket/biz-websocket/src/main/kotlin/com/tencent/bkrepo/websocket/config/WebsocketConfiguration.kt @@ -94,6 +94,9 @@ class WebsocketConfiguration( override fun configureWebSocketTransport(registration: WebSocketTransportRegistration) { registration.addDecoratorFactory(wsHandlerDecoratorFactory()) + registration.setMessageSizeLimit(webSocketProperties.messageSizeLimit) + registration.setSendTimeLimit(webSocketProperties.sendTimeLimit) + registration.setSendBufferSizeLimit(webSocketProperties.sendBufferSizeLimit) super.configureWebSocketTransport(registration) }