-
Notifications
You must be signed in to change notification settings - Fork 119
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
Socket timeout slower response #1368
Comments
packages/api-client/src/helpers/magentoLink/graphQl.ts:21 Need to add params for timeout. Default is 15sec. Docs, |
@sequensucks We use Apollo and have only the following file: node_modules/@vue-storefront/magento-api/lib/helpers/magentoLink/graphQl.d.ts:
I do not understand how we can use the configuration you mentioned. |
@henkspane you're looking into 'declaration file' that is generated and available in your node_modules. File mention by @sequensucks is available in VSF Magento package. If you've generated VSF website with the CLI you don't have it in your project but only reference in node_modules. |
The timeout seems to be much shorter than 15s – perhaps 7-8s. It is short enough that legitimate requests (place order) are affected. Are there any workarounds available? |
Has anyone found any solution to this problem? We are using version 1.1.0 and facing the same issue, there is a timeout of around 8s for requests from VSF to Magento Edit: I have managed to fix it by adding the following code in middleware.config.js -> inside integrations.magento.customApolloHttpLinkOptions |
We are also seeing this error on a couple of order placements! |
For what it's worth, I think this is a major bug especially since there is no known workaround. |
This worked for us |
What is your question / Please describe your issue
What is your question / Please describe your issue
We are performing requests using GraphQL queries by Apollo. When a query response is slow (+-10 seconds), the storefront will throw a socket timeout error. Example:
[VSF][error]: [Network error]: FetchError: request to https://test.environment.example/graphql?query=query+categoryList%7Bcategories%7Bitems%7Bchildren%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+children%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+children%7Binclude_in_menu+is_anchor+level+name+position+product_count+uid+url_path+url_suffix+__typename%7D__typename%7D__typename%7Dproduct_count+name+uid+__typename%7D__typename%7D%7D&operationName=categoryList&variables=%7B%7D failed, reason: Socket timeout
The socket timeout is a problem in local environments.
I am not able to see a global configuration setting in Vue storefront for changing the default socket timeout for all queries. Is there a way to do this?
What version of Magento 2 Integration are you using?
1.0.1
Code of Conduct
The text was updated successfully, but these errors were encountered: