Right now, when streaming queries, we automatically retry up to 5 times, but we definitely shouldn't retry if we've already begun streaming the result to the client.
PuppetDB no longer retries queries internally, suppressing some transient connection errors. Instead, it will return an error code more immediately. For the moment, the previous behavior can be restored by setting the PDB_USE_DEPRECATED_QUERY_STREAMING_METHOD environment variable. See the [configuration information](https://puppet.com/docs/puppetdb/latest/configure.html#experimental-environment-variables) for further details.