#DB sometimes returns rows, sometimes returns nothing

4 messages · Page 1 of 1 (latest)

last sand
#

I wanted to raise this formally although I've been discussing it in #hyperdrive , as I'm not sure where in the CF stack the issue lies.

Basically a single query in my app, among hundreds, sometimes returns rows and sometimes returns this:

{
  command: null,
  rowCount: null,
  oid: null,
  rows: Array(0),
  fields: Array(0)
  ...
}

All other queries work fine, as I say. So I'm sat here refreshing and endpoint and sometimes seeing data and sometimes not (with no code changes).

This is happening while running my app locally (with --remote) so HD is being used. So I assume this is a HD issue, though perhaps it's at a Workers/Wrangler level for all I know. I could disable HD caching, but then that presumably defeats the point of HD?

Any help is greatly appreciated as this is blocking me at the mo! Thanks in advance.

last sand
#

This turned out to be an apparently already-known bug with Hyperdrive. The fix for now is to disable caching. Supposedly a longterm fix is coming out later this week.

grim gale
#

Mind sharing where you've found information about the bug in question? I recently stumbled upon the same problem in some internal tooling I made reliant on Hyperdrive to stabilize connection pooling, and it took me a good while to figure out it was happening due to the caching being enabled.

I could disable HD caching, but then that presumably defeats the point of HD?

I think it depends on your workload, in my case it made sense to disable the caching since it was accessing some frequently changing data, and I only wanted Hyperdrive to act as a connection pooler to reduce the number of connections from Workers instances to my origin database

last sand
#

Check out the conversation in #hyperdrive from around [this message downwards](#hyperdrive message).

CF have acknowledged there's a bug causing this, though I believe i saw a message in that channel saying they'd now pushed a fix, so I may try to re-enable caching and see if it recorrurs (right now I continue to have caching disabled).

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.