Closed mehmetilker closed 8 years ago
Option 1 Try IIS (not IIS express) - https://github.com/sergey-tihon/Stanford.NLP.NET/issues/15#issuecomment-77526331
Option 2 Try to increase stack size - https://github.com/sergey-tihon/Stanford.NLP.NET/issues/16#issuecomment-164655567
Thank you for your quick reply. I could not try on my local but it worked on Azure. So it is a problem related with IIS Express I assume.
I would like to add some observations..
As I see leaving IIS express is some cumbersome just for this problem I tried to increase stack size with utilizing Thread class but unfortunately it is not possible to handle return value in asp.net project. Not directly related but close to it; other option is Task.Run but there is no way to set maxStackSize...
There should be setting for IIS Express.
new System.Threading.Thread(() =>
{
......
pipeline.annotate(document);
......
}, 414565).Start();
For those who is wondering a simple solution:
By default II express is working in 32 bit mode. And according to this article https://support.microsoft.com/en-us/kb/932909 " In Windows Server 2008 and higher, the maximum stack size of a thread running on 32-bit version of IIS is 256 KB, and on an x64 server is 512 KB." All we need is little bit higher then 400K for depparse annotator.
So we can set 64bit version of IIS Express in VS 2015 Tools> Options> Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express for web sites and projects
happy codings...
Thank you @mehmetilker !
You are welcome @sergey-tihon. Thank you for your effort.
Everthing works fine with all annotators in console application but I got this exception when I try on asp.net mvc. If I remove depparse it works. So the problem is depparse on asp.net or it is same for parse annotator too.
Is there any setting I need to change ?
The code is as follows:
`
var jarRoot = @"D:\Projects\nlp\stanford-corenlp-full-2015-12-09\stanford-corenlp-3.6.0-models";