Deebster
05/30/2021, 3:14 AMVanessa🦩
05/30/2021, 10:03 PMclient: pz9e54qse4c
12:18:27.918 <<< INFO Error: This script has been upgraded. Please send a new request to connect to the new version.
at Worker.broadcast (./index.mjs:254:36)
at Worker.TICK (./index.mjs:229:14)
at ./index.mjs:346:28
at ./index.mjs:26:28
12:18:31.438 <<< RECV [22793837,288,"<meta ...>"]
12:18:33.850 <<< RECV [22796245,289,"<msg #1>","ouabam4xhhp",1622315913842,0]
12:18:35.319 <<< RECV [22797711,290,"<msg #2>","ouabam4xhhp",1622315915308,7]
12:18:35.898 <<< RECV [22798288,291,"<msg #3>","ouabam4xhhp",1622315915880,12]
12:18:36.662 websocket closed with code: 1006
client: ouabam4xhhp
12:18:31.410 websocket connected
12:18:31.410 >>> JOIN {"client":"ouabam4xhhp"}
12:18:31.422 <<< SYNC @22793637#287
12:18:31.438 <<< RECV [22793837,288,"<meta ...>"]
12:18:33.842 >>> SEND [0,0,"<msg #1>","ouabam4xhhp",1622315913842,0]
12:18:33.848 <<< RECV [22796245,289,"<msg #1>","ouabam4xhhp",1622315913842,0]
12:18:35.308 >>> SEND [0,0,"<msg #2>","ouabam4xhhp",1622315915308,7]
12:18:35.320 <<< RECV [22797711,290,"<msg #2>","ouabam4xhhp",1622315915308,7]
12:18:35.880 >>> SEND [0,0,"<msg #3>","ouabam4xhhp",1622315915880,12]
12:18:35.894 <<< RECV [22798288,291,"<msg #3>","ouabam4xhhp",1622315915880,12]
12:18:36.661 websocket closed with code: 1006
Vanessa🦩
05/30/2021, 10:03 PM12:18:27.918
the DO tries to do a socket.send()
to the first client pz9e54qse4c
, gets the error This script has been upgraded. Please send a new request to connect to the new version.
12:18:31.410
the DO accepts a new websocket from client ouabam4xhhp
, receives a message JOIN
,
12:18:31.422
DO successfully sends back SYNC
to ouabam4xhhp
12:18:31.438
SO successfuly sends [22793837,288,"<meta ...>"]
to both clients, both RECV them
12:18:33.842
client ouabam4xhhp
sends [0,0,"<msg #1>"
12:18:33.848
DO sends [22796245,289,"<msg #1>"
, received by ouabam4xhhp
12:18:33.850
DO sends [22796245,289,"<msg #1>"
, received by pz9e54qse4c
... this repeats twice with "<msg #2>"
and "<msg #3>"
12:18:36.661
websocket for ouabam4xhhp
closed
12:18:36.662
websocket for pz9e54qse4c
closed
Also, it's not visible in these logs, but I confirmed that the DO successfully stored all the messages, even after the This script has been upgraded
error. The websockets were only closed 8 seconds after that error.
What would be the correct way to handle that error? If I close all websockets, can I be sure new connections will go to the new DO instance? Is there something like location.reload
to force a fresh start of this DO?Vanessa🦩
05/30/2021, 10:06 PMMrHalzy
05/31/2021, 1:53 PMMrHalzy
05/31/2021, 4:09 PMGreg-McKeon
05/31/2021, 6:55 PMGreg-McKeon
05/31/2021, 7:01 PMGreg-McKeon
05/31/2021, 7:03 PMVanessa🦩
05/31/2021, 7:04 PMGreg-McKeon
05/31/2021, 7:06 PMGreg-McKeon
05/31/2021, 7:07 PMVanessa🦩
05/31/2021, 7:08 PMMrHalzy
05/31/2021, 7:09 PMGreg-McKeon
05/31/2021, 7:09 PMVanessa🦩
05/31/2021, 7:14 PMbrett
06/01/2021, 4:04 PMVanessa🦩
06/01/2021, 4:07 PMbrett
06/01/2021, 4:12 PMpz9e54qse4c
received an error but was still able to use the websocket?Vanessa🦩
06/01/2021, 4:14 PMVanessa🦩
06/01/2021, 4:16 PMbrett
06/01/2021, 4:28 PMeidam | SuperSaaS
06/01/2021, 4:29 PMnetwork connection lost
errors are pretty much gone for our use-case ❤️ Thank you! 👏brett
06/01/2021, 4:30 PMmatt
06/01/2021, 4:49 PMError: This script has been upgraded
message being transmitted to the client?
* We currently aren't disconnecting drained DOs from storage, but we will start doing so after next week's release.
* Can you reliably reproduce this problem on code updates?Vanessa🦩
06/01/2021, 5:00 PMwrangler tail
would be awesome)
* disconnecting storage sounds like a good idea.
* haven't tried to reproduce yet, and I now added handling that error by closing all websockets and disconnecting storagematt
06/01/2021, 5:26 PMError: This script has been upgraded. Please send a new request to connect to the new version.
down the websocket that was disconnected, as that send()
should fail with the same error. Once any websocket method returns that error, any other methods should continue to fail with the same error.
* Improving the DO dev experience is definitely on our mind -- it's a complex problem though, as we for see larger apps potentially having dozens of DO classes with hundreds of instances, and it's not clear what folks would expect from wrangler tail
on a large project like that.Vanessa🦩
06/01/2021, 5:46 PMVanessa🦩
06/01/2021, 6:02 PMwrangler tail
on DO, if I could see the logs of a single DO given its id (or even more conveniently, the binding and name passed into binding.idFromName) would be great for a start. Down the road a list of names to stream logs simultaneously would be great, but running multiple tails in parallel would be good enough. Also a command to list all DOs would be nice. Or even a little "watch logs" button in the dashboard next to the list of all DOs with their storage inspectors ... a girl can dream right? 😉Erwin
06/02/2021, 2:48 AM