Skip to content

Commit

Permalink
Hard-code two web threads for debugging aid
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Dec 29, 2024
1 parent 2fef926 commit c8fd11c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/webserver/webserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,15 +397,7 @@ void http_init(void)
// A referrer will be sent for same-site origins, but cross-origin requests will
// send no referrer information.
// The latter four headers are set as expected by https://securityheaders.io
char num_threads[3] = { 0 };
// Use 16 threads if more than 8 cores are available, otherwise use
// 2*cores. This is to prevent overloading the system with too many
// threads.
// We use the number of available (= online) cores which may be less
// than the total number of cores in the system, e.g., if a
// virtualization environment is used and fewer cores are assigned to
// the VM than are available on the host.
sprintf(num_threads, "%d", get_nprocs() > 8 ? 16 : 2*get_nprocs());
const char *num_threads = "2";
const char *options[] = {
"document_root", config.webserver.paths.webroot.v.s,
"error_pages", error_pages,
Expand Down

0 comments on commit c8fd11c

Please sign in to comment.