Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express + PG Streamed response hangs #164

Closed
ngauthier opened this issue Sep 9, 2019 · 5 comments
Closed

Express + PG Streamed response hangs #164

ngauthier opened this issue Sep 9, 2019 · 5 comments

Comments

@ngauthier
Copy link

Hi folks,

This issue occurred starting with 1.7.0 (I'm assuming from the pg instrumentation). It only occurs with streaming queries and responses, not regular queries.

We're using express and knex, but with knex in this case it's a raw query knex.raw(QUERY).stream() with pipeline into express's res response object.

I was going to make a failing test case but I noticed there are no tests for the pg instrumentation.

The result of this bug is that requests hang until they time out upstream and are cancelled.

@ngauthier
Copy link
Author

Additionally, (and this is probably a separate issue, but not sure). These streamed responses don't seem to have the correct duration_ms. Even using async/await for the express handler it seems honeycomb considers them complete as soon as they start streaming, not when they finish.

@allyjweir
Copy link
Contributor

allyjweir commented Oct 1, 2019

Hi @ngauthier, testing of these instrumentations isn't particularly easy. When developing the pg instrumentation I developed a small Express app that would run it through its paces. Manual testing sucks but sure is better than nothing.

Perhaps you could submit a PR to that project including your new breaking test? If you can provide a test case then I'd be more than happy to take a look and try fix the problem!

In terms of a short-term workaround, I'd recommend disabling the pg instrumentation when you initialise beelines. Here is a snippet from the beeline docs:

const beeline = require("honeycomb-beeline");
beeline({
  enabledInstrumentations: beeline
    .getInstrumentations()
    .filter(i => i !== "pg")
  /* ... additional configuration ... */
});

@giulianob
Copy link

@allyjweir It looks like the honeycomb sdk could potentially cause serious hangs in our application and there seems to be several bugs preventing pg from working well. Wondering if we could get an update on these bugs thanks.

@allyjweir
Copy link
Contributor

allyjweir commented Oct 31, 2019

Hi @giulianob, please see this comment for a way to disable the pg instrumentation. This will get your team moving without this faulty instrumentation causing any further issues.

I wasn't provided a reproduction of the issue so haven't tried to address this specific issue. The author of issue #171 has shared a reproduction so I will try to find some time to resolve that issue which might also fix this one.

@vreynolds
Copy link
Contributor

Hello,

We will be closing this issue as it is a low priority for us. It is unlikely that we'll ever get to it, and so we'd like to set expectations accordingly.

As we enter 2022 Q1, we are trimming our OSS backlog. This is so that we can focus better on areas that are more aligned with the OpenTelemetry-focused direction of telemetry ingest for Honeycomb.

If this issue is important to you, please feel free to ping here and we can discuss/re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants