You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2018. It is now read-only.
First I found this problem with my project, sometime static files will return 502 with cgi gateway error.
Today I do a diggup, to reproduce this problem you needs:
Host asp.net core application on IIS, if you run with kestrel only, this problem won't happen.
Response 304, only 304 cause this problem.
Explict flush the response
Do the request parallel
I uploaded a minimal reproduce project, please check it.
It maybe a thread race condition problem because only parallel request will cause this problem. WebApplication1.zip
I don't known if it's same with other 502.3 issues,
and I already using asp.net core 1.0.0 as you can see in the project.json.
The text was updated successfully, but these errors were encountered:
This seems to be a Kestrel issue. Updated repro code:
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Run(ThreadPoolVersion);
}
private async Task DefaultVersion(HttpContext context)
{
if (context.Request.Path == "/")
{
context.Response.ContentType = "text/html";
var html = string.Join("",
Enumerable.Range(0, 100).Select(n => $"<img src='/{n}.jpg'></img>"));
await context.Response.WriteAsync(html);
}
else if (context.Request.Path.Value.EndsWith(".jpg"))
{
context.Response.Headers.Add("Last-Modified", "Fri, 17 Jun 2016 06:56:44 GMT");
context.Response.ContentType = "image/jpeg";
context.Response.StatusCode = 304;
await context.Response.Body.FlushAsync();
// context.Response.Body.Flush();
}
}
I saw the same behaviors with both the DefaultVersion and ThreadPoolVersion repro methods. If I start the site with just Kestrel then the browser will make many parallel requests but only the first 8 will complete, the remainder time out. If I launch IIS Express then most of the requests complete, but 1/10 fail with a 502.
Uh oh!
There was an error while loading. Please reload this page.
First I found this problem with my project, sometime static files will return 502 with cgi gateway error.
Today I do a diggup, to reproduce this problem you needs:
I uploaded a minimal reproduce project, please check it.
It maybe a thread race condition problem because only parallel request will cause this problem.
WebApplication1.zip
I don't known if it's same with other 502.3 issues,
and I already using asp.net core 1.0.0 as you can see in the project.json.
The text was updated successfully, but these errors were encountered: