When I make a large request through iisnode, it sends a 200 response but quits sending data once it hits 7.92MB.
I'm guessing this is a setting I'm missing somewhere? I tried messing with some things, like setting flushResponse to true, but no luck. PHP (in IIS) doesn't do this, and node run by itself doesn't either.
I am suffering from the same. My node application stops sending data after about 4 MB. It looks like it's just forgetting to send the rest and leaves the connection open.
I'm using expressjs's sendFile which is internally using stream / pipe. The problem occurs in IIS Express / Webmatrix 2 and on Azure Web Site. Running the same app with node.exe works fine.
Can you collect ETW traces from iisnode using instructions from http://tomasz.janczuk.org/2011/09/using-event-tracing-for-windows-to.html and post them somewhere I can look?
Which version of node.js and iisnode are you using?
I just upgraded to 0.8.18 (64 bit), though this issue has persisted through several upgrades. I don't think I've used anything older than 0.8.8 or so. Also using the latest iisnode (0.2.2-x64).
Here's the ETL:
I'm having the same issue, tested with node 0.8.18 32 and 64 bit, iisnode 0.2.2-x64 on IIS 7.5 running at Azure. I experimented with various sized files. The issue occurs with files >4mb. The download stops at the first 4mb increment after 50% of the download. I saw fails at 4mb on a 6mb file, 8 of 12, 12 of 21 and 44 of 85. I've posted an ETL at http://sdrv.ms/VtT6yz. Please let me know if there's anything I can do further to assist.
@spanditcaa: Interesting! I can confirm the size of the response in my case was 12MB, which is consistent with your observations.
I'll also add that unlike spanditcaa and and msairio, I'm not running Azure. I'm running IIS 7.5 on Windows Server 2008.
Not surprisingly my failing file was 6.7 MB which also supports @spanditcaa's findings.
I see no response to @spanditcaa, @msairio, @gumballhead?
This inability to upload larger files appears to be a limitation in iisnode which will prevent its use (and by extension, Azure websites) in many scenarios, such as media uploads of pictures and movies via Node. Is anyone good enough with C++ to examine the memory allocation and I/O paths in iisnode? Or should we assume iisnode is not a go-forward strategy for Microsoft's support of Node on the Azure PaaS?
This is a bug in iisnode. When upload or download size exceeds certain threshold (which depends on many factors), IO operations start completing asynchronously, which invokes a code path that contains an issue with chunk transfer encoding processing. Additionally, under certain circumstances synchronous IO processing of large uploads and downloads can go down a code path that results in stack overflow. I am working a a fix to both issues.
Thanks for the update Tomasz
fix #255: stress issue with large upload and download