Server returned nothing (no headers, no data) when uploading/downloading larger files











up vote
0
down vote

favorite












when uploading or downloading larger files (bigger than 30 MB), I am occasionally getting this exception:



"System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.Net.Http.CurlException: Server returned nothing (no
headers, no data) at
System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at
System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)


It is a .NET Core 2.0 web app running in Linux/nginx environment. So, sometimes the uploads/downloads of the very same files are performed without problems, sometimes I am getting the 'no headers, no data' exception and sometimes I can get also 502 Bad gateway or 504 gateway timeout error exception.



It is multilayer environment where the request is forwarded firstly to microservice in orchestration layer and then microservice in service layer.



Any idea/advice?










share|improve this question
























  • Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
    – Tseng
    Nov 17 at 17:08










  • @Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
    – Neno
    Nov 17 at 17:27












  • You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
    – Tseng
    Nov 17 at 17:30










  • I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
    – Neno
    Nov 17 at 17:39















up vote
0
down vote

favorite












when uploading or downloading larger files (bigger than 30 MB), I am occasionally getting this exception:



"System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.Net.Http.CurlException: Server returned nothing (no
headers, no data) at
System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at
System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)


It is a .NET Core 2.0 web app running in Linux/nginx environment. So, sometimes the uploads/downloads of the very same files are performed without problems, sometimes I am getting the 'no headers, no data' exception and sometimes I can get also 502 Bad gateway or 504 gateway timeout error exception.



It is multilayer environment where the request is forwarded firstly to microservice in orchestration layer and then microservice in service layer.



Any idea/advice?










share|improve this question
























  • Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
    – Tseng
    Nov 17 at 17:08










  • @Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
    – Neno
    Nov 17 at 17:27












  • You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
    – Tseng
    Nov 17 at 17:30










  • I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
    – Neno
    Nov 17 at 17:39













up vote
0
down vote

favorite









up vote
0
down vote

favorite











when uploading or downloading larger files (bigger than 30 MB), I am occasionally getting this exception:



"System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.Net.Http.CurlException: Server returned nothing (no
headers, no data) at
System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at
System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)


It is a .NET Core 2.0 web app running in Linux/nginx environment. So, sometimes the uploads/downloads of the very same files are performed without problems, sometimes I am getting the 'no headers, no data' exception and sometimes I can get also 502 Bad gateway or 504 gateway timeout error exception.



It is multilayer environment where the request is forwarded firstly to microservice in orchestration layer and then microservice in service layer.



Any idea/advice?










share|improve this question















when uploading or downloading larger files (bigger than 30 MB), I am occasionally getting this exception:



"System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.Net.Http.CurlException: Server returned nothing (no
headers, no data) at
System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error) at
System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)


It is a .NET Core 2.0 web app running in Linux/nginx environment. So, sometimes the uploads/downloads of the very same files are performed without problems, sometimes I am getting the 'no headers, no data' exception and sometimes I can get also 502 Bad gateway or 504 gateway timeout error exception.



It is multilayer environment where the request is forwarded firstly to microservice in orchestration layer and then microservice in service layer.



Any idea/advice?







linux asp.net-core .net-core nginx-ingress






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 12:23









Nick Rak

899211




899211










asked Nov 17 at 15:10









Neno

3181823




3181823












  • Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
    – Tseng
    Nov 17 at 17:08










  • @Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
    – Neno
    Nov 17 at 17:27












  • You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
    – Tseng
    Nov 17 at 17:30










  • I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
    – Neno
    Nov 17 at 17:39


















  • Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
    – Tseng
    Nov 17 at 17:08










  • @Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
    – Neno
    Nov 17 at 17:27












  • You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
    – Tseng
    Nov 17 at 17:30










  • I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
    – Neno
    Nov 17 at 17:39
















Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
– Tseng
Nov 17 at 17:08




Did you read docs.microsoft.com/en-us/aspnet/core/mvc/models/… and github.com/aspnet/Announcements/issues/267 and most importantly this: docs.microsoft.com/en-us/aspnet/core/mvc/models/… ?
– Tseng
Nov 17 at 17:08












@Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
– Neno
Nov 17 at 17:27






@Tseng, the only thing I haven't tried is uploading using streaming. Since the app I am talking about is not in production, it is unbelievable that .NET Core itself is not able to buffer a file of 37 MB since I am the single user. Running in Visual studio, in docker environment - upload operation succeeds every single time. I would say that the problem is specific for Linux/nginx/.NET Core combination.. Oh, and very important - it is running in multilayer service architecture where the request is post further to orchestration layer and then service layer..
– Neno
Nov 17 at 17:27














You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
– Tseng
Nov 17 at 17:30




You have provided very little information in your question. whats your nginx settings? Most webservers have a limit on http body size. The linked ones tell you the limits for ASP.NET Core and IIS. You should check nginx limits and default values
– Tseng
Nov 17 at 17:30












I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
– Neno
Nov 17 at 17:39




I do not have a direct access to nginx, but The DevOps already edited it since the limit was very low (4MB I think).. I can upload now also the bigger files, but occasionally I get exceptions as I described in initial post. All the errors indicate some interruption of communication between layers.
– Neno
Nov 17 at 17:39

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352493%2fserver-returned-nothing-no-headers-no-data-when-uploading-downloading-larger%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53352493%2fserver-returned-nothing-no-headers-no-data-when-uploading-downloading-larger%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]