For Workers & Pages, what is the name of the domain?
Dev
What is the error message?
Script modified; context reset.
What is the issue or error you’re encountering
Cannot use wrangler dev for a worker that uses DO and KV (thousands of objects in prod KV)
What steps have you taken to resolve the issue?
Tried running wrangler dev --remote and wrangler dev --local to compare behaviors in each mode.
What are the steps to reproduce the issue?
During dev cycles the worker I’m responsible for needs to have access to live (remote) KV data so I’ve always run wrangler dev --remote. This works fine.
Now I’ve added a durable object to the project and found that when running wrangler dev --remote the DO is evicted (including persistent storage) every few seconds and on every save of a file. This is a known issue (🐛 BUG: wrangler dev Durable object storage resets after 10 seconds of idle time · Issue #2700 · cloudflare/workers-sdk · GitHub) that Cloudflare closed as ‘not planned’. I see that using wrangler dev --local works alright for DO.
How does one develop a worker using both DO and remote KV? What am I missing? Is this just not something people are doing? Any advice much appreciated!