Description
Which Cloudflare product(s) does this pertain to?
Wrangler or miniflare
What version(s) of the tool(s) are you using?
3.5.0
What version of Node are you using?
18.16.1
What operating system are you using?
Linux (Ubuntu 20.04)
Describe the Bug
In one of my handlers, after executing a select query with batch, I get the following exception:
workerd/server/server.c++:2533: error: Uncaught exception: kj/async-io-unix.c++:186: disconnected: remote.worker_do_not_log; Request failed due to internal error
It seems it's in some kind of destructor or finalizer or other thread / cleanup task, since execution continues after the query, because I can see console.log output from subsequent code. However, the server crashes before it is able to return the response (client doesn't get a response back.) I can reproduce this every single run. Commenting out that query makes the exception go away. No other queries are executed in that request.
I deleted, the database, deleted .wrangler dir, and recreated the database. Same issue.
I created a new hello world project (following the getting started guide), containing only the "hello world" response and got the same exception on the first run only. Subsequent runs were fine. That's interesting, what state could wrangler be keeping that's the same for the machine, but not in the directory/project/code which all changed?
I switched back to the original project, reproduced the exception again. Went back to the new hello world, but it's fine now, I can't reproduce the exception in the hello world project again. Odd.
I then added the same database, same migrations, same query to the hello world project. No issues. I don't know how to make a minimal repro for it.
edit: I tried again this morning, after rebooting overnight. The error is gone, the reboot fixed it. It wasn't the query at fault here, probably not d1 (directly anyway). There's something else going on, and somehow a reboot fixed it.
It's tough to debug a problem with so little to go on. Is there anything I can do to get more info? Is there a way to build a debug version of wrangler or miniflare? Enable logging?
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response