It is really confusing: After letting julia http server run for some time, the websocket won’t connect any longer, giving EOFError: read end of file
EOFError: read end of file
│ Stacktrace:
│ [1] (::Base.var"#wait_locked#739")(s::Sockets.TCPSocket, buf::IOBuffer, nb::Int64)
│ @ Base ./stream.jl:947
│ [2] unsafe_read(s::Sockets.TCPSocket, p::Ptr{UInt8}, nb::UInt64)
│ @ Base ./stream.jl:955
│ [3] unsafe_read(c::HTTP.Connections.Connection{Sockets.TCPSocket}, p::Ptr{UInt8}, n::UInt64)
│ @ HTTP.Connections ~/.julia/packages/HTTP/sJD5V/src/Connections.jl:203
│ [4] unsafe_read
│ @ ./io.jl:774 [inlined]
│ [5] unsafe_read(s::HTTP.Connections.Connection{Sockets.TCPSocket}, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base ./io.jl:773
│ [6] read!
│ @ ./io.jl:775 [inlined]
│ [7] read
│ @ ./io.jl:779 [inlined]
│ [8] readframe(io::HTTP.Connections.Connection{Sockets.TCPSocket}, ::Type{HTTP.WebSockets.Frame}, buffer::Vector{UInt8}, first_fragment_opcode::HTTP.WebSockets.OpCode)
│ @ HTTP.WebSockets ~/.julia/packages/HTTP/sJD5V/src/WebSockets.jl:129
│ [9] readframe(io::HTTP.Connections.Connection{Sockets.TCPSocket}, ::Type{HTTP.WebSockets.Frame}, buffer::Vector{UInt8})
│ @ HTTP.WebSockets ~/.julia/packages/HTTP/sJD5V/src/WebSockets.jl:128
│ [10] receive(ws::HTTP.WebSockets.WebSocket)
│ @ HTTP.WebSockets ~/.julia/packages/HTTP/sJD5V/src/WebSockets.jl:681
│ [11] iterate(ws::HTTP.WebSockets.WebSocket, st::Nothing)
│ @ HTTP.WebSockets ~/.julia/packages/HTTP/sJD5V/src/WebSockets.jl:720
│ [12] iterate
│ @ ~/.julia/packages/HTTP/sJD5V/src/WebSockets.jl:718 [inlined]
The weirdest thing is that if I build up a connection from another browser (or private window), it somehow recovers itself…
This is really weird and only happens after several hours of running. So hard to reproduce. Any help what this could be about and how to workaround is highly appreciated.
EDIT: it is still there over night, so it is something stable enough to investigate as soon as it happens.
EDIT: while it is working in a private window, today this didn’t heal the connections from standard browser.