Specs for reference:
Node: 12.16.1
Faunadb: 4.2.0
MacOS: 11.3
Interesting my other project which also connects to the same database but using JS faunadb client v3.0.1 does not encounter this sort of issues — all queries go through smoothly without timeouts.
I have also noticed another thread that might be related — Receiving Socket Hang Up error often
It seems that one of them is also on v4.x of js faunadb client
Any help on this would be greatly appreciated, thanks!
Update:
I have just downgraded my client to v3.0.2 and it works perfectly again, no more timeouts. I’m pretty sure the issue is isolated to v4.x of the client.
I’m going to pass this along to our driver developers so they can take a look and see if there’s room for improvement. You’re welcome to file issues with them directly in the future if something like this happens again. The place to report issues is available on the GitHub project for the driver.
It’s really hard to distinguish as it uses different API versions.
have you measured response time? have you pass custom timeout option?
this error occurs if your request takes longer than timeout (by default 60 sec)
@Sergii_Zinkevych — nope I didn’t measure the response time but I did not pass any custom timeout either; 60 secs timeout sounds about right actually.
I simply ran the script and waited for it to produce some form of result, or timeout (which happened most of the time with 4.2.0).