Jump to content

502 Bad Gateway Error


Recommended Posts

intranetsnob
Posted

Hi all

Majority of the time Emby instance just crashes and stop resulting in 502 Bad Gateway

Is there a reason why Emby would crash so many times? And has anyone come across this and found solution?

Posted

HI there, Emby never sends back a 502 gateway error. You must have some layer on top of that that is causing that. Please attach the emby server log from when the problem occurred:

Thanks.

intranetsnob
Posted

Hi Luke,

Attached is log file.

Correct, this is proxied but emby keeps crashing, hopefully the log gives you an insight, this is prior to emby shutting down.

embyserver-63835892270.txt

Posted

What time did the problem occur?

intranetsnob
Posted

Hi Luke

It's very random, been occurring for a while now so thought to ask. 

This particular one occurred around 12ish 

Thanks 

Posted
22 hours ago, intranetsnob said:

Hi Luke

It's very random, been occurring for a while now so thought to ask. 

This particular one occurred around 12ish 

Thanks 

I don't see anything at that time in your server log. Can you get log files from your reverse proxy? We need to know why it's sending back that error code.

I thought it might be a general emby server error that sends back a 500 error code, which the reverse proxy might be changing to 502, but I don't see any errors being thrown in the emby server log. Thanks.

  • 1 month later...
  • 6 months later...
Anby250608
Posted
I have the same problem how to solve 502 Bad Gateway at the same time 12
Happy2Play
Posted (edited)
44 minutes ago, Anby250608 said:
I have the same problem how to solve 502 Bad Gateway at the same time 12

Please provide server log.

 

But the OP log error suggest the platform is crashing.  And my have to dig into system logs.

2023-11-18 00:20:50.382 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.12.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 5.15.0-88-generic (buildd@lcy02-amd64-058) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #98-Ubuntu
	Framework: .NET 6.0.14
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 32
	Data path: /config
	Application path: /system
	Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content.
	   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1ContentLengthMessageBody.ReadAsyncInternal(CancellationToken cancellationToken)
	   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
	   at System.IO.Pipelines.PipeReader.CopyToAsyncCore[TStream](TStream destination, Func`4 writeAsync, CancellationToken cancellationToken)
	   at ServiceStack.StreamExtensions.CopyToNewMemoryStreamAsync(Stream stream) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/StreamExtensions.cs:line 673
	   at ServiceStack.Text.NetCoreMemory.DeserializeAsync(Stream stream, Type type, DeserializeStringSpanDelegate deserializer) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Text/src/ServiceStack.Text/NetCoreMemory.cs:line 168
	   at Emby.Server.Implementations.Services.ServiceHandler.CreateRequest(HttpListenerHost host, IRequest httpReq, RestPath restPath)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Microsoft.AspNetCore.Server.Kestrel.Core
	TargetSite: Void Throw(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason)

 

Edited by Happy2Play

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...