Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Configuring Timeout [v1.x] [question] [documentation] #831

Closed
rossb opened this issue Oct 15, 2018 · 7 comments · Fixed by #968
Closed

Configuring Timeout [v1.x] [question] [documentation] #831

rossb opened this issue Oct 15, 2018 · 7 comments · Fixed by #968

Comments

@rossb
Copy link

rossb commented Oct 15, 2018

Problem

I can't find a way to configure the timeout setting on Slate Tools. I often have to work on a slow broadband connection, where file uploads via Slate often fail with the default timeout setting.

Is there an entry I can add to the .env file to configure this? Similar to config.yml in pre-1.0 where you could add say timeout: 2m.

Replication steps

Upload any file while running slate watch on a slow broadband connection ≈4MEG down (may not be easy to reproduce, I am located in Spain which may play a factor in the slow server response I get).

The timeout response in console is as follow:

[development]: 1 / 1 [====================================================================] 100 %
18:42:53 [development]Asset Perform Update to assets/layout.theme.styleLiquid.scss.liquid at host glasshouse-shop.myshopify.com
	Status: 0
	Errors: Put https://store-name.myshopify.com/admin/themes/33064714283/assets.json: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

My Error 18:42:53 [development]Asset Perform Update to assets/layout.theme.styleLiquid.scss.liquid at host glasshouse-shop.myshopify.com

✔  Files uploaded successfully!

More Information

Version of Slate: 1.0.0-beta.10

Version of Node: 8.9.4

OS: OS X 10.11.6 (15G22010)

Note that the console output then prints Files uploaded successfully!, even though it failed (a separate issue but thought worth noting).

@t-kelly
Copy link
Contributor

t-kelly commented Oct 16, 2018

Hey rossb -- Slate uses node-themekit which wraps Themekit to make requests to Shopify's Asset API. I don't believe the timeout value is configurable, but you could open an issue to expose one, and then I could do the same with Slate so it could be set via the slate.config.js file?

@rossb
Copy link
Author

rossb commented Oct 25, 2018

Thanks t-kelly, I will open an issue on node-themekit to request this.

@farmerpaul
Copy link

I, too, get timeout errors almost every time I deploy (and like @rossb, ending with a "Files overwritten successfully!" success message). Not sure if this is related to the fact that I live and work on a 2 Mbps Internet connection, although HTTP timeouts are not something I generally experience day to day. Really only when I'm deploying my Slate theme to Shopify, and then it's virtually every time I deploy, at least a good handful of the files display this message. Perhaps the default setting could be made a little more generous?

@farmerpaul
Copy link

What seems to be going on here (correct me if I'm wrong) is that on my relatively slow Internet connection where I live, it's timing out on the transfer of individual files due to their size – not because there's an HTTP delay because the server isn't responding. Basically, they're getting uploaded as fast as they can, but if some of these larger files don't manage to make it up there before this time limit (which happens a lot on my connection), it gives up.

Seem to me that the timeout should be triggered only when the remote server stops responding for a period of time.

At it works now, I manage to do a 100% successful deploy maybe 1 out of 10 times. Otherwise there's usually between 4 and a couple dozen of these timeouts.

@markdavies
Copy link

markdavies commented Jan 24, 2019

I'm getting the same experience on my slow internet connection too, but I pretty much never get a 100% deploy.

@farmerpaul - I think you're right about the size vs connectivity theory. My internet is slow but consistent and I see the same as you

@t-kelly
Copy link
Contributor

t-kelly commented Jan 29, 2019

This needs to be exposed in slate.config.js. PRs are welcome.

@lock
Copy link

lock bot commented Mar 13, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants