/stats endpoint broken
Opened this issue · 1 comments
Synse commented
The /stats
endpoint is currently returning an HTTP 500 error. The following error is logged to the console when this happens:
19:10:46.014 [error] Ranch listener :websocket_server, connection process #PID<0.5364.0>, stream 4 had its request process #PID<0.5399.0> exit with reason :function_clause and stacktrace [{Access, :get, [:ok, :url, nil], []}, {Certstream.WebsocketServer, :"-init/2-fun-0-", 2, [file: 'lib/web.ex', line: 39]}, {Enum, :"-reduce/3-lists^foldl/2-0-", 3, [file: 'lib/enum.ex', line: 2111]}, {Certstream.WebsocketServer, :init, 2, [file: 'lib/web.ex', line: 37]}, {:cowboy_handler, :execute, 2, [file: '/home/codespace/workspace/certstream-server/deps/cowboy/src/cowboy_handler.erl', line: 37]}, {:cowboy_stream_h, :execute, 3, [file: '/home/codespace/workspace/certstream-server/deps/cowboy/src/cowboy_stream_h.erl', line: 300]}, {:cowboy_stream_h, :request_process, 3, [file: '/home/codespace/workspace/certstream-server/deps/cowboy/src/cowboy_stream_h.erl', line: 291]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]
After looking at the code for a bit I believe there are two issues here.
:sys.get_state
can timeoutstate
is:ok
for any workers that failed to start completely