The User Search Best Practices article (User Search Best Practices) mentions the following:
Search queries time out (HTTP status code 503) if they’re not completed in two seconds or less. Queries that take longer indicate that it’s either an expensive query or that the query has an error resulting in it not completing quickly
Is it possible to change this timeout in our PSaaS environment?
The query timeout is not configurable. It’s worth noting that running expensive queries is generally not a good idea (even if it falls within the timeout) since it can impact database performance more broadly.
If you experience any issues with search queries timing out please reach out to Support and we may be able to help you optimize the query.