Replies: 1 comment
-
I have solved the issue. Reason for the above errors I still get 504 errors randomly once in a while when querying the backend. It is resolved by querying again or refreshing the page. I believe this is due to me hosting everything on FREE plans. Can someone else with the same issue confirm this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Good day to you all,
I have hosted a Next.JS starter ecommerce template on vercel.
MedusaJS backend on render.com.
Issue 1:
On initial load of the website I get the below error
This Serverless Function has timed out.
Your connection is working correctly.
Vercel is working correctly.
504: GATEWAY_TIMEOUT
Code: FUNCTION_INVOCATION_TIMEOUT
ID: bom1::mgq9s-1715924748897-a01b3b736769
I have to refresh the page multiple times for the landing page to load.
Issue 2:
I get below errors when making any POST requests to the backend
Error logs in VERCEL:
[POST] /us/products/sweatpants?nxtPcountryCode=us&nxtPhandle=sweatpants status=504
Task timed out after 10.01 seconds
Logs in the Backend:
10.223.165.207 - - [17/May/2024:05:51:46 +0000] "POST /store/carts/cart_01HY2HP6V0916N7ND9D7S5XDNH/line-items HTTP/1.1" - - "-" "axios/0.24.0"
10.223.148.255 - - [17/May/2024:05:53:51 +0000] "GET /store/regions HTTP/1.1" 200 3301 "-" "Vercel Edge Functions"
I am unable to resolve the issue. Everything works fine when I run the frontend locally. Please help
I can post my middleware.ts file if it helps.
Example
https://medusa-fe-default.vercel.app/
Steps to Reproduce
https://medusa-fe-default.vercel.app/
Open the website.
Try to add any products to cart. Their will not be any response from the application due to 504 errors.
Beta Was this translation helpful? Give feedback.
All reactions