-
Notifications
You must be signed in to change notification settings - Fork 213
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
Server Request Interrupted Error on Heroku after a while #264
Comments
The only thing I see wrong at first glance is that you're not waiting for uploaded files to be completely flushed to disk (the While the |
@mscdex Thank you for the swift response. However, I am not doing any heavy work while the files are been streamed to disk. If you noticed my flow, I have support for uploading multiple files. So, what I did was after each file upload to disk I basically added the path of that file to a It is when all the files have been uploaded to disk and the Now, the major issue here is that Plus, I followed the examples exactly as given in the busboy documentation and only did final processing within the callback of Also this line But according to what you said, can you recommend a way for me to know if there are hanging files in node memory that I can clear up before Thanks in anticipation of your response. |
Like I said,
I'm not familiar with how Heroku works or what debugging/troubleshooting facilities they provide. Is it possible there is an
Which stream? |
@mscdex Thank you once again for your elaborate response. As you've suggested, henceforth I will surely try to wait for the writeStream of each file to fire Now, unto the main issue which is
Do you have any idea what that means? Is it possible that Kindly review and see if you can understand what they meant here. Thanks once again for your anticipated response. |
The part you quoted is referring to a lower level part of HTTP. Node already takes care of those sorts of details. As long as you're calling |
Damn! So I'm stucked in this as I have no idea on what next to do to prevent this |
Or is it possible it has something to do with the Free version of Heroku? Because I successfully uploaded files of about 30MB with the above code up to 5 times and then on the 6th time I started getting the dreaded |
@mscdex Is it possible that this issue nodejs/node#12339 is likely responsible to my case? My node version is this |
I strongly believe Heroku is throwing the So it's likely that there is an interruption going on when But I don't know how to find out where exactly it is happening. |
Try to set autoDestroy of busboy to false. |
@Uzlopak Oh really? Please where can I set that? Thank you |
here pseudocode: const bb = new busboy(); |
@Uzlopak It worked!!!!!! You have no idea how u just saved me my Job. I'm so greatly thankful to you. If you believe in the concept of God, then I'll say may God bless you 👍 ... I truly truly truly appreciate. Thanks a trillion times. |
@hashweather Maybe I can make you interested in our busboy fork? https://github.com/fastify/busboy .It has autoDestroy set to false by default. So with our fork you would have never had this issue in the first place. Check what else we have done in our fork. :) More performance and more safety (fixed security issues) are waiting for you. |
@Uzlopak Wow! Fantastic.. Thank you very much. I'll migrate asap. |
Closing this as this should no longer be an issue with v1.x. If you find that it is, let me know and we can re-open this. |
Thanks for this amazing library.
I however have a weird issue going on. I am going to paste my code exactly as it is in production just so I can get as much help as possible to resolving my problem.
The problem I am having is this:
When I uploaded a file of about 26MB more than 4 times using Busboy it worked flawlessly.
Now after a while I keep getting this error in my heroku application logs that states:
sock=backend at=error code=H18 desc="Server Request Interrupted" method=PUT
I did some research and found out that it has something to do with handling chunked file upload according to their documentation
https://help.heroku.com/18NDWDW0/debugging-h18-server-request-interrupted-errors-in-nodejs-applications
I can't seem to figure out what is going on but the above
Server Request Interrupted
error message has kept me stalled pretty badly as users are complaining that file uploads are no longer going through after a while.Please I need all the help I can get at resolving this.
Here is the code that handles the large file uploads
I know the code is quite exhausting to understand easily but kindly look through and see if I am missing anything that is causing the dreaded
Server Request Interrupted
Error after a while.Thank you
The text was updated successfully, but these errors were encountered: