wix-fetch timeout issue

I am calling a third-party API using wix-fetch; however if the JSON return takes longer than 14 seconds i get an ExecutionTimeoutError: WebMethod request timed-out after 14 seconds…

This is critical to our site to present data to our users. I am looking into setTimeout() method, but since the fetch call is asynchronous, i’m not sure is a good solution.

Is there somewhere i can extend the timeout?

2 Likes

Hi. Can you show me your code how you could resolve this problem with setTimeout() method? My mail sazonoveo@gmail.com Thank you!

I was not able to resolve the problem with setTimeout(). I still have this problem and can not get it to work. Please let me know if you find a solution.

Hello. Did you find a solution of this problem? Thank you.

I never solved the problem directly. I went with an entirely different solution and backend away from Wix. I got to a workaround before I left by splitting my api calls into smaller chunks and storing the data then pushing to an array and sorting together, but performance was not good so I moved to an new solution. Only using wix as landing page now.

@blakezeisler Thank you!
Please, say what’s the new solution? It would be interesting for me, because now my site doesn’t work good. =( It can be solution for me too.