Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restart dev when session expires #197

Closed
Tracked by #12
threepointone opened this issue Jan 6, 2022 · 0 comments · Fixed by #317 or #313
Closed
Tracked by #12

restart dev when session expires #197

threepointone opened this issue Jan 6, 2022 · 0 comments · Fixed by #317 or #313
Assignees
Labels
enhancement New feature or request

Comments

@threepointone
Copy link
Contributor

Sessions when developing don't last forever, they expire after a few minutes. In wrangler1, we detect this and restart the session every time it expires (implemented in https://github.com/cloudflare/wrangler/pull/2008/files). We should do the same with wrangler2.

@threepointone threepointone added the enhancement New feature or request label Jan 6, 2022
@threepointone threepointone self-assigned this Jan 6, 2022
@threepointone threepointone mentioned this issue Jan 7, 2022
27 tasks
@Electroid Electroid added this to the 2.0 milestone Jan 20, 2022
@petebacondarwin petebacondarwin moved this to Blocking in workers-sdk Jan 25, 2022
threepointone added a commit that referenced this issue Jan 27, 2022
When we run `wrangler dev`, the session that we setup with the preview endpoint doesn't last forever, it dies after ignoring it for 5-15 minutes or so. The fix for this is to simply reconnect the server. So we use a state hook as a sigil, and add it to the dependency array of the effect that sets up the server, and simply change it every time the server closes.

Fixes #197

(In wrangler1, we used to restart the whole process, including uploading the worker again, making a new preview token, and so on. It looks like that they may not have been necesssary.)
threepointone added a commit that referenced this issue Jan 27, 2022
When we run `wrangler dev`, the session that we setup with the preview endpoint doesn't last forever, it dies after ignoring it for 5-15 minutes or so. The fix for this is to simply reconnect the server. So we use a state hook as a sigil, and add it to the dependency array of the effect that sets up the server, and simply change it every time the server closes.

Fixes #197

(In wrangler1, we used to restart the whole process, including uploading the worker again, making a new preview token, and so on. It looks like that they may not have been necesssary.)
@petebacondarwin petebacondarwin moved this from Blocking to In Progress in workers-sdk Jan 27, 2022
@petebacondarwin petebacondarwin moved this from In Progress to In Review in workers-sdk Jan 27, 2022
threepointone added a commit that referenced this issue Jan 27, 2022
When we run `wrangler dev`, the session that we setup with the preview endpoint doesn't last forever, it dies after ignoring it for 5-15 minutes or so. The fix for this is to simply reconnect the server. So we use a state hook as a sigil, and add it to the dependency array of the effect that sets up the server, and simply change it every time the server closes.

Fixes #197

(In wrangler1, we used to restart the whole process, including uploading the worker again, making a new preview token, and so on. It looks like that they may not have been necesssary.)
threepointone added a commit that referenced this issue Jan 27, 2022
When we run `wrangler dev`, the session that we setup with the preview endpoint doesn't last forever, it dies after ignoring it for 5-15 minutes or so. The fix for this is to simply reconnect the server. So we use a state hook as a sigil, and add it to the dependency array of the effect that sets up the server, and simply change it every time the server closes.

Fixes #197

(In wrangler1, we used to restart the whole process, including uploading the worker again, making a new preview token, and so on. It looks like that they may not have been necesssary.)
Repository owner moved this from In Review to Done in workers-sdk Jan 27, 2022
@petebacondarwin petebacondarwin added this to the Wrangler 2.0 milestone Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants