IISNode quits on response after 7.92MB #255

Closed
gumballhead opened this Issue Jan 17, 2013 · 11 comments

Projects

None yet

5 participants

@gumballhead

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.

@msairio
msairio commented Jan 28, 2013

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.

@tjanczuk
Owner

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?

@tjanczuk
Owner

Which version of node.js and iisnode are you using?

@gumballhead

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:
http://www.filedropper.com/iisnodeetl

@spanditcaa

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.

@gumballhead

@spanditcaa: Interesting! I can confirm the size of the response in my case was 12MB, which is consistent with your observations.

@gumballhead

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.

@msairio
msairio commented Feb 2, 2013

Not surprisingly my failing file was 6.7 MB which also supports @spanditcaa's findings.

@gscott
gscott commented Mar 2, 2013

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?

@tjanczuk
Owner
tjanczuk commented Mar 5, 2013

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.

@gumballhead

Thanks for the update Tomasz

@tjanczuk tjanczuk closed this in 8b6fbbf Mar 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment