Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IISNode quits on response after 7.92MB #255

Closed
kirkedev opened this issue Jan 17, 2013 · 11 comments
Closed

IISNode quits on response after 7.92MB #255

kirkedev opened this issue Jan 17, 2013 · 11 comments

Comments

@kirkedev
Copy link

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
Copy link

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
Copy link
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
Copy link
Owner

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

@kirkedev
Copy link
Author

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
Copy link

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.

@kirkedev
Copy link
Author

kirkedev commented Feb 2, 2013

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

@kirkedev
Copy link
Author

kirkedev commented Feb 2, 2013

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
Copy link

msairio commented Feb 2, 2013

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

@gscott
Copy link

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
Copy link
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.

@kirkedev
Copy link
Author

kirkedev commented Mar 5, 2013

Thanks for the update Tomasz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants