DB sometimes returns rows, sometimes returns nothi...
# workers-help
m
I wanted to raise this formally although I've been discussing it in #1150557986239021106 , 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:
Copy code
{
  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.
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.
e
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
m
Check out the conversation in #1150557986239021106 from around [this message downwards](https://discord.com/channels/595317990191398933/1150557986239021106/1193975170109546586). 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).
Someone in that thread reckoned it affected only parameterised queries, though I'm not sure about that; the vast majority of my queries are parameterised, and it was only one query that was presenting the issue.