Hi
We are getting the below error when we try to upload the package and after clicking upload button for few attempts, it will upload.
Found this error from the octopus logs
2021-06-24 15:50:35.0630 9736 43 ERROR Read
System.IO.IOException
—> Microsoft.AspNetCore.Server.HttpSys.HttpSysException (995): The I/O operation has been aborted because of either a thread exit or an application request.
— End of inner exception stack trace —
2021-06-24 15:50:35.0630 9736 43 ERROR Unhandled error on request: POST https://octopusx.xxx.com.au/api/Spaces-1/packages/raw?replace=true 8000016f-0002-f400-b63f-84710c7967bb by XXXXXX :
System.IO.IOException
—> Microsoft.AspNetCore.Server.HttpSys.HttpSysException (995): The I/O operation has been aborted because of either a thread exit or an application request.
— End of inner exception stack trace —
at Microsoft.AspNetCore.Server.HttpSys.RequestStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
at Nancy.IO.RequestStream.MoveStreamContentsToFileStream()
at Nancy.IO.RequestStream.MoveStreamOutOfMemoryIfExpectedLengthExceedSwitchLength(Int64 expectedLength)
at Nancy.IO.RequestStream…ctor(Stream stream, Int64 expectedLength, Int64 thresholdLength, Boolean disableStreamSwitching)
at Octopus.NancyOwin.NancyMiddleware.<>c__DisplayClass3_0.<b__1>d.MoveNext() in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Owin\NancyMiddleware.cs:line 108
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.HttpOverrides.HttpMethodOverrideMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, Lazy1 unitOfWork, ILog log, IActionContextAccessor actionContextAccessor) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Web\UnitOfWorkMiddleware.cs:line 42 at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, Lazy
1 unitOfWork, ILog log, IActionContextAccessor actionContextAccessor) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Web\UnitOfWorkMiddleware.cs:line 42
at Octopus.Server.Web.Middleware.OctopusClientOldVersionWarningMiddleware.InvokeAsync(HttpContext context, IAutomationContext automationContext) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Web\Middleware\OctopusClientOldVersionWarningMiddleware.cs:line 38
at Octopus.Server.Web.Middleware.RequestLoggerMiddleware.InvokeAsync(HttpContext context) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Web\Middleware\RequestLoggerMiddleware.cs:line 42
at Octopus.Server.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context, CorrelationId correlationId) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Web\Middleware\ErrorHandlingMiddleware.cs:line 82
2021-06-24 15:50:35.0858 9736 43 ERROR Could not send the exception response since the http headers have already been sent to the client.
2021-06-24 15:50:35.0973 9736 43 ERROR ProcessRequestAsync
System.InvalidOperationException: Headers already sent.
at Microsoft.AspNetCore.Server.HttpSys.Response.CheckResponseStarted()
at Microsoft.AspNetCore.Server.HttpSys.FeatureContext.ConsiderEnablingResponseCache()
at Microsoft.AspNetCore.Server.HttpSys.FeatureContext.OnResponseStart()
at Microsoft.AspNetCore.Server.HttpSys.FeatureContext.CompleteAsync()
at Microsoft.AspNetCore.Server.HttpSys.MessagePump.ProcessRequestAsync(Object requestContextObj)
at Microsoft.AspNetCore.Server.HttpSys.MessagePump.ProcessRequestAsync(Object requestContextObj)
2021-06-24 15:50:42.1836 9736 42 INFO Request took 2606ms: POST https://octopusx.xxx.com.au/api/Spaces-1/packages/raw?replace=true 80000101-0006-f700-b63f-84710c7967bb by XXXX
Any idea why this is happening?