Skip to content

Commit b9ba6a2

Browse files
committed
Fix bogus active counting for procs terminating due to down-scaling
Be sure to mark the proc as idel before actually doing "exit()", otherwise we will count it as busy for the whole time the proc is terminated by OS (we automatically clear the load stats only upon sigchild on attendant) (cherry picked from commit e982e90)
1 parent 4d79a71 commit b9ba6a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ void dynamic_process_final_exit(void)
490490
/* if a TCP proc by chance, reset the tcp-related data */
491491
tcp_reset_worker_slot();
492492

493+
pt_become_idle();
494+
493495
/* mark myself as DYNAMIC (just in case) to have an err-less termination */
494496
pt[process_no].flags |= OSS_PROC_SELFEXIT;
495497
LM_INFO("doing self termination\n");

0 commit comments

Comments
 (0)