Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Bump timeout to 30 seconds, using port-authority #1577

Closed
wants to merge 1 commit into from

Conversation

alexbjorlig
Copy link

@alexbjorlig alexbjorlig commented Oct 1, 2020

According to the source code here https://github.com/Rich-Harris/port-authority/blob/bf12e69618cc59dbc0d46a5132902df8a584e39f/src/wait.ts#L3,
we can specify a timeout - and a default timeout of 5 seconds is not
high enough for many bigger express applications (see #730).

This PR is simply inspired by the dialog in pull request: #985,
but I thought it would just be simpler to create a new one.

Closes #985

According to the source code here https://github.com/Rich-Harris/port-authority/blob/bf12e69618cc59dbc0d46a5132902df8a584e39f/src/wait.ts#L3,
we can specify a timeout - and a default timeout of 5 seconds is not
high enough for many bigger express applications (see issue 730).

This PR is simply inspired by the dialog in pull request: sveltejs#985,
but I thought it would just be simpler to create a new one.
@benmccann
Copy link
Member

I'm seeing that @Conduitry suggested in #730 (comment) that simply increasing the timeout is not the right solution to this issue

@alexbjorlig
Copy link
Author

Ok - but do we have another workaround? It's a relatively big issue right? We can't reliably run sapper with our express server because of the timeout being too low

@Conduitry
Copy link
Member

As I said in the comment linked Ben linked above, the main thing that could be done would be to make the dev livereload server start up right away, rather than waiting for the regular server to be ready. If someone has a giant app or a computer with limited resources, they could always end up being later than any timeout. Polling periodically might be nice if we want to fix the error message displayed to the user, but the important part is to not prevent the dev livereload server from starting.

@alexbjorlig
Copy link
Author

the main thing that could be done would be to make the dev livereload server start up right away, rather than waiting for the regular server to be ready

How would you like that to be done? Should this function just emit 'ready' right away, instead of waiting for the port - or is it more complicated than that?

I would be happy to help on this, but might need some guidance 😅

@benmccann
Copy link
Member

Maybe we should focus on making sure this works as expected in SvelteKit instead since this one seemed a bit difficult to handle correctly. Would love if you can test the startup in SvelteKit and see if it works as expected for you

@benmccann benmccann closed this Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants