linux - What is the reason to kill old server threads/processes and launch new ones after serving certain number of requests -
for example apache httpd provides directive maxconnectionsperchild controls how server recycles processes killing old ones , launching new ones.
what reason killing old threads @ after serving number of connections.
isn't hot cache thing applicable here?
from the docs:
setting maxconnectionsperchild non-zero value limits amount of memory process can consume (accidental) memory leakage.
so if you're leaking 1 mb per request (malloc() not free()), gradually use more , more memory until run out , apache gets killed. if set maxconnectionsperchild 100, child gradually use 100 mb of memory, killed , go down 0.
the "hot cache" thing applicable here, setting maxconnectionsperchild slow down apache. that's why default infinite. maxconnectionsperchild meant inelegant duct-tape on memory leaks. time-pressured programmer might prefer spending 1 minute setting maxconnectionsperchild, rather 1 week hunting malloc() calls.
Comments
Post a Comment