c# - Service memory overflow processing or protection -
i ways or solution process memory overflow. perchance restart service when memory overflow or when grows above value. create work before die.
i know not normal situation , errors leeds memory overflow needs corrected, need shure after issue service recovered.
upd have windows service. server accepts many connections clients. clients create actions leeds memory consumption. not leak, eat memory process clients reqierments. @ moments (peak load) ram not enough. not big problem. problem after first memory overflow exception service can't process anything. have logs total of memory overflow exception. not self restarting, not processing clients requests, not exit state.
i want find ways exit state of service, , if can not restart it. if possible predict such state.
the first way limit clients, not garanted client eat much memory.
is posible observe unsafe memory consumption , stop processing new clients, or correctly restart? posible selfrestart service if memory over?
memory overflow hard track/deal with. have sort of memory leak. creating memory leaks in .net still possible. cannot deal memory overflow on programming level, since you're working in managed environment have garbage collection working eliminate resources no longer used. best thing prevent memory leaks. if want restart service when memory consumptions goes high, need utilize sort of management bundle microsoft scom, comprehensive instrumentation windows.
check these threads memory leak in c#
http://crazorsharp.blogspot.com/2009/03/net-memory-leaks-it-is-possible.html
i hope helps
c# service
No comments:
Post a Comment