earthstar-project / replica-server

An always-online Earthstar peer for your shares.
GNU Lesser General Public License v3.0
5 stars 2 forks source link

ExtensionSyncWebsocket crashes server on browser refresh #9

Open basham opened 2 years ago

basham commented 2 years ago

I'm syncing a local Deno replica server (v3.0.0) with a local browser app (Earthstar v9.3.2), using the ExtentionSyncWebsocket extension. The initial connection works. I can see the message activity. However, the server crashes when I refresh the browser when this activity is happening (there are so many messages, I don't know if this would also happen when there is no activity). The server displays this message:

Error 'IO error: Broken pipe (os error 32)' contains boxed error of unknown type: Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }) Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

sgwilym commented 2 years ago

This is an error I've seen with Deno + particularly large messages being sent by websockets. I think I saw a merged PR for this issue so it may be fixed in Deno 1.21.

One way I dealt with this was that peers only request docs from each other 10 docs at a time now. Let me know if upgrading Deno helps at all.

basham commented 2 years ago

I upgraded Deno from v1.19.1 to v1.21.1. Unfortunately, I'm noticing the same server behavior and same error message.