IIS stackoverflow

自闭症网瘾萝莉.ら 提交于 2019-12-13 15:26:20

问题


We've been chasing an bug on my WCF web application (W2K3 IIS) which was resulting in a stackoverflow.

To fix it I needed to increase the stack of my application by creating a thread with the amount of memory I wanted to allocate.

But what happens with the child threads? My app creates many threads, will they inherit the value or will I have to set every single thread with the new value?

Edit: If I run the (WCF) services as a console host they work just fine. Also, If I modify the stack of the w3wp.exe (with the EDITBIN) they also work fine on IIS.
So I need to increase the stack. I know I can create a thread with the stack size (is there another way?) but I need to know what happens with the child threads.

Edit2: We need to define some BIG vectors which are resulting in a stack overflow. So it is not a bug in our system. I really need (have) to increase the stack


回答1:


After trying it myself I can say yes! Child threads keep the amount of stack set on the parent thread.




回答2:


It sounds like you need to think more carefully about why you're getting a stack overflow instead of merely allocating more memory.

Is there some function with a huge amount of local variables or an array that is going on the stack?

Are you sure you aren't leaking somewhere with inadvertent recursive loops?

-Adam



来源:https://stackoverflow.com/questions/595098/iis-stackoverflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!