I am having issues with a collection search since ...
# community-help
s
I am having issues with a collection search since migrating from own server to cliud The own server I had was a VPS with merely 10GB ram, 50GB storage, 1GB bandwidth for 18USD a month The cliud we have now is a 4GB ram (according stats, about 4 times what we really use) and 3 nodes high availability, for way over 100 USD per months The exact same identaical dataset is used, the same exact code is used to implement instnat search on the website However, using the cloud instance, I get tons of
Unhandled Promise Rejection: Error: 500 - Request timed out.
on https://cdn.jsdelivr.net/npm/instantsearch.js@4.44.0?ver=4.44.0 I already increased
connectionTimeoutSeconds
, at no avail. As soon I switch back to my own server, this does not happen.
k
Please share some timestamps where these 500 errors were logged in GMT
s
well, I see them in the console, as in right now, for example
Not sure how to get you a exaact timestamp from that
k
Same cluster as what you shared earlier?
s
indeed
It appears to hapen espseically when (semtnaic) free text search is combined with facets.
I can send you a direct liunk where you can actuaslly replicat it immediately
it somehow says connection timeout is 5kms, which is not what I defined
k
Let me check
s
PS: anmd then sometimes it does work 🤷
k
Ok I can see that some queries are taking 4-5 seconds and your client default timeout is smaller than this so that's translating to those errors.
As for the actual reason why it's taking longer, I suspect that the
embedding
field is being fetched and sent to the client. Can you try adding that to
exclude_fields
search parameter?
s
but I increased
connectionTimeoutSeconds
to 10 already I could not find any other relevant client config for the instnatn search adapater other than that. How would I increase the timeout? (And, more importantly, why was this no issue on a relatively cheap 18 bucks VPS, but became an issue on this rather massive cluster? in comparison?)
Copy code
exclude_fields:
							'embedding,Transcript,Summary,Topic,Guest,Channel,Author,Category,Tag,Access,Episode,Date', //We pull these from the WP DB via PHP, thus exclude from response.
						prefix: false,
k
The VPS could be having a single more powerful CPU plus maybe instance SSD storage.
Can you copy one of those failed queries from the console (right click > copy as curl) and DM me?
s
OK, one sec
To update this thread in case someone stumbles on the same, the issue is due to external tools such as OpenAI Switching to the inbuilt typesense model resolved it for good.