How to know who kills my threads

后端 未结 15 741
南旧
南旧 2020-12-05 00:19

I got a thread that is just banishing.. i\'d like to know who is killing my thread and why.

It occurs to me my thread is being killed by the OS, but i\'d like to

15条回答
  •  清歌不尽
    2020-12-05 01:08

    Various people (including myself, here) pointed out that hosting a long-running thread in IIS is a bad idea. Your thread will being running inside an IIS 'worker process'. These processes are periodically terminated (recycled) by IIS, which will cause your thread to die.

    I suggest that you try turning-off IIS worker process recycling to see if that makes a difference. You can find more information here.

提交回复
热议问题