Zend certified PHP/Magento developer

When Apache shuts down it leaves many php-cgi processes behind

If I start Apache and use any of 8 virtual hosts on it for a short while, by going through WordPress and other CRM’s admin UI and blogs/storefronts, then it shuts its php-cgi processes down as I bring it down (first, any number of php-cgi.exe die, and last the 2x httpd.exe die). If instead I let the server run in normal production for a few days, then when I shut it down the 2x httpd.exe die but leave a whole bunch of php-cgi processes behind. It probably shuts down a tiny handful of all of the php-cgi processes that it spawns in the mean time. Tried to wait for a couple of min, but the stale processes still hang on.

These processes are not zombies: they can be killed from task manager of by taskkill.

What I checked: that there are no long-running MySQL queries. Databases are quite small, and queries complete within milliseconds, 500 being the absolute worst.

OS: Windows

Apache: 2.4.54

PHP: Both 8.1.6 and 7.4.30

Plenty of available RAM, fast SSD, low CPU load on many available cores.