Browse Source

Modify server configuration parameters

Adjusted max_uri_handlers to fit URI handlers and maintain memory usage.
SybexXx 2 days ago
parent
commit
fb7cad04ec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      code/main/server_main.cpp

+ 2 - 2
code/main/server_main.cpp

@@ -724,13 +724,13 @@ httpd_handle_t start_webserver(void)
     httpd_handle_t server = NULL;
     httpd_handle_t server = NULL;
     httpd_config_t config = HTTPD_DEFAULT_CONFIG();
     httpd_config_t config = HTTPD_DEFAULT_CONFIG();
 
 
-    config.task_priority = tskIDLE_PRIORITY+5; // Tested: higher server priority improves Web-UI responsiveness under load
+    config.task_priority = tskIDLE_PRIORITY + 5; // Tested: higher server priority improves Web-UI responsiveness under load
     config.stack_size = 8 * 2048; // 16 KB; tested with image and OTA requests
     config.stack_size = 8 * 2048; // 16 KB; tested with image and OTA requests
     config.core_id = 1; // previously -> 2023-01-02: 0, 2022-12-11: tskNO_AFFINITY;
     config.core_id = 1; // previously -> 2023-01-02: 0, 2022-12-11: tskNO_AFFINITY;
     config.server_port = 80;
     config.server_port = 80;
     config.ctrl_port = 32768;
     config.ctrl_port = 32768;
     config.max_open_sockets = 5; // Conservative HTTP client limit; lwIP socket pool configured separately
     config.max_open_sockets = 5; // Conservative HTTP client limit; lwIP socket pool configured separately
-    config.max_uri_handlers = 43; // Make sure this fits all URI handlers. Memory usage in bytes: 6*max_uri_handlers
+    config.max_uri_handlers = 37; // Make sure this fits all URI handlers. Memory usage in bytes: 6*max_uri_handlers
     config.max_resp_headers = 8;                        
     config.max_resp_headers = 8;                        
     config.backlog_conn = 5;                        
     config.backlog_conn = 5;                        
     config.lru_purge_enable = true; // this cuts old connections if new ones are needed.               
     config.lru_purge_enable = true; // this cuts old connections if new ones are needed.