Hi. This relates to the postgres replication between the backend primary DB and the frontend replica DBs. When a user query holds up the replication system for too long, the database has to terminate the query so that the replication doesn't fall too far behind. This approach is unavoidable, I'm afraid.
Within the last couple of weeks we've migrated the frontend replicas to use a much, much more performant storage array. Performance has improved vastly, load averages have dropped, etc, etc. In my own use of crt.sh, I haven't yet seen any HTTP 502s since then. I hope other crt.sh users are seeing the same improvements!