feat: 优化服务超时时间(临时处理)

This commit is contained in:
tbphp committed 2025-06-13 10:20:13 +08:00
1 parent 245fd96790
commit 3232d34534
3 files changed
+11 -38

No files matched your search

+2 -2
View File
@@ -61,8 +61,8 @@ func main() {
server := &http.Server{
Addr: fmt.Sprintf("%s:%d", serverConfig.Host, serverConfig.Port),
Handler: router,
ReadTimeout: 60 * time.Second, // Increased read timeout for large file uploads
WriteTimeout: 300 * time.Second, // Increased write timeout for streaming responses
ReadTimeout: 120 * time.Second, // Increased read timeout for large file uploads
WriteTimeout: 1800 * time.Second, // Increased write timeout for streaming responses
IdleTimeout: 120 * time.Second, // Increased idle timeout for connection reuse
MaxHeaderBytes: 1 << 20, // 1MB header limit
}