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?
linux asp.net-core .net-core nginx-ingress
add a comment |
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?
linux asp.net-core .net-core nginx-ingress
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
add a comment |
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?
linux asp.net-core .net-core nginx-ingress
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
linux asp.net-core .net-core nginx-ingress
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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