python - Killing individual Apache processes in mod_python -


we having problem individual apache processes utilizing large amounts of memory, depending on request, , never releasing main system. since these requests can happen @ time, on time web server pushed swap, rendering unresponsive ssh. worse, after request has finished, python fails release memory wild, results in number 500mb - 1gb apache processes lying around.

we push few requests per second, each request has potential heavy.

what have way kill individual apache process child after has finished serving request if resident memory exceeds threshold. have tried several ways of doing inside mod_python, appears form of system exit results in response not completing client.

outside of gracefuling processes (which want avoid) whenever happens, there anyway tell apache arbitrarily kill off process after has finished serving request? ideas welcome.

as additional caveat, due legacy nature of system, can’t upgrade later version of python, can’t utilize improved memory performance of 2.5. similarly, stuck our current os.

versions: system: red hat enterprise 4

apache: 2.0.55

python: 2.3.5

i'd possible, tremendous hack (and instable) - should set-up process external apache in case, supervise running processes , kill individual apache when goes beyond memory/time predefined limits.

such script can kept running continuously mainloop performs it's checks every few seconds, or put in crontab run every minute.

i see no reason try inside serving processes themselves.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -