What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
*Question about the speed /response time of the glue API…* I’ve got a docker instance running the S
Question about the speed /response time of the glue API…
I’ve got a docker instance running the Spryker B2C demo. I’ve built a separate Angular app that connects to the Spryker Glue API. At the moment I’m doing simple things like requesting the Category tree and a list of products.
What I’m finding is that the Glue API is taking a long time to respond to requests. Much longer than what you’d expect on a local machine. Some API requests can take 12-15 seconds to respond.
Is this common? Or have I missed some setup configuration?
Many thanks
Comments
-
It's definitely not ok.
There are multiple possible reasons to cause such behaviour:
• the speed of the host machine itself
• local env type: docker/sdk or vagrant devvm
• etc.
I would say that you need to trace\profile the request and find where it takes time to be processed.0 -
For example https://glue.at.b2b.demo-spryker.com/catalog-search?q= takes ~140ms to respond.
0 -
-
Thank you… I’m using the New M1 Mac with a high spec - and I’m using the Docker setup here: https://github.com/spryker/docker-sdk/pull/225.
** but I noted that my previous laptop which was not M1 had the same issue.
I’m using the docker/sdk
0 -
Ok… so from the developer console… it looks like the DNS lookup is taking 10 seconds.
0 -
With the actual processing taking 0.01 seconds
0 -
Sorry, I can't help here. I haven't seen any problems like this and I don't experience anything like this on my own but I'm on linux.
AFAIK M1 support is still on the way and even then there may be performance problems not related to Spryker but to the stack itself on M1\arm chips.
0 -
Thank you Valerii! I’m already deep in StackOverflow threads on DNS! 🙂
0 -
Can you paste the answer here, what to do, in order to decrease the DNS-lookup-time?
If i remember correctly, some other Mac-Users experiences similar problems0 -
Ok… so I think I found something… but I need a Spryker expert to verify.
(note: full disclosure… I’ve only been learning Spryker and Docker for a few weeks. So I don’t know if this solution is correct or what the potential consequences are)
So…
The DNS lookup delay is actually 5 seconds (ignore comment above I misread the console).
The delay is EXACTLY 5 seconds… each and every time… which (with my debugging hat on here) tells me there is a setting somewhere that is telling requests to wait 5 seconds.
So I searched the Spryker installation for “5000” (configs are usually in milliseconds) but this yielded nothing.
Then I searched “5s” and found settings in: “/docker/deployment/default/docker-compose.yml”
The setting was under a node called “healthcheck >> timeout”…
I changed these to “0s” and all requests started running instantly.
Could someone with more Spryker knowledge than me confirm that this was the fix? Also… was the change I made advisable?
Many thanks.
0 -
No clue about the DNS lookup & timeout thing, but I can tell you that I recently setup a Spryker project on an M1 machine and had these Glue API response times: access-tokens ~1000ms, guest-cart-items ~600ms. For comparison, the same project with the same settings was ~5x faster on an Intel MacBook.
And I did not need to modify any healthchecks or timeouts to get it running properly. So something’s definitely off with your project setup or local environment or the machine itself somehow…0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random