edge
edge copied to clipboard
.NET code hangs when calling Edge.Func when it executes node.dll
In my C# code using EdgeJS to run Node.js I am experiencing inconsistent but somewhat frequent hangs when Edge.Func is called. I downloaded source and made debug build and debugged into Edge.Func and found that the hang occurs when it hits the v8Thread start on the link that calls to node.dll:
NodeStart(2, new string[] { "node", AssemblyDirectory + "\\edge\\double_edge.js" });
It hangs indefinitely. My code runs within Web API v2 in a DelegatingHandler SendAsync method. Like I said its inconsistent, sometimes it runs fine, sometimes it hangs and usually after an iisreset it goes back to normal. If I send a second request to the service while the first one is hanging, the second one hangs also but I believe its because of the lock (syncRoot)
inside of Edge.Func. I've seen this happen when the code is deployed to multiple different environments.
Do you have any ideas or workarounds?
Also, I experienced something similar to https://github.com/tjanczuk/edge/issues/85 and worked around it by including a copy of msvcr120.dll from my dev machine inside bin\edge\x64 in the deployed code. Don't know if that helps at all.
EdgeJS is awesome, so thanks for it.
-Tom