driver: bad connection
thrown randomly
#1629
Unanswered
miparnisari
asked this question in
Q&A
Replies: 2 comments 5 replies
-
It is too complex to investigate. Please minimize the reproducer. Im most cases, "bad connection" errors happens after other error logged (not returned). Long living connection may cause it too.
|
Beta Was this translation helpful? Give feedback.
5 replies
-
@methane out of curiosity, do you see anything incorrect in this code? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue description
I have a repo with some tests that run against MySQL and Postgres. The tests against Postgres always pass. The tests against MySQL randomly (50% chance i'd say) throw a
driver: bad connection
error. The error occurs both on one-off queries and transactions.The interesting thing is that I can only reproduce in GitHub actions, never locally. What this means is that I don't know how to isolate the problem. Is it Github Actions? Docker on Github Actions? MySQL driver? MySQL db? My own code?
Example code
https://github.com/miparnisari/openfga. You can fork it and make commits to main to trigger the tests.
Error log
In a read:
In a transaction:
Configuration
Driver version (or git SHA): v1.8.1
Go version: 1.22.6
Server version: MySQL 8
Server OS: The issue happens on Ubuntu 22.04.4 (Github Actions).
Beta Was this translation helpful? Give feedback.
All reactions