-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
I found that after a certain amount of time/transactions (its unclear which one) spec tests will hang when running against a mysql server.
I was able to add debug and get this traced down to the DB adapter layer where it starts to read a packet but never completes:
2023-04-26T22:01:59.604210Z DEBUG - db: Executing query -- query: "INSERT INTO `kvs` (`v`, `k`) VALUES (?, ?)", args: [nil, "foo"]
2023-04-26T22:01:59.604372Z TRACE - db: About to execute query
2023-04-26T22:01:59.604419Z TRACE - mysql: About to execute query
2023-04-26T22:01:59.604465Z TRACE - mysql: #<MySql::Connection:0x103b95a20>
2023-04-26T22:01:59.604513Z TRACE - mysql: write start - #<MySql::WritePacket:0x1074826e0>
2023-04-26T22:01:59.604564Z TRACE - mysql: write done - #<MySql::WritePacket:0x1074826e0>
2023-04-26T22:01:59.604698Z TRACE - mysql: read start - MySql::IncomingPacket[length: 5, seq: 4, remaining: 5]
I was able to complete a full spec run only if i manually closed all the connections in the connection pool.
# added to spec_helper.cr
Spec.after_each do
Granite::Connections["mysql"].not_nil!.database.pool.close
endI will keep investigating.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels