Closed freeNestor closed 6 months ago
did you try to increase timeout more than 30 seconds? after 30 seconds driver will send interrupt message to the server and cancel the current operation
did you try to increase timeout more than 30 seconds? after 30 seconds driver will send interrupt message to the server and cancel the current operation
According to the logs I provided above, some goroutines did time out and cancel the operation. My point is that although timeout is set, one of them is blocked without timeout. I'm confused.
for the driver there are 2 timeouts you can set
1- timeout of individual operation using context
2- global timeout. set using url option timeout
default=120 seconds
the timeout with context will first try to cancel the current operation (which need network read/write) the global timeout will stop blocking operation when server refuse to respond
for the driver there are 2 timeouts you can set 1- timeout of individual operation using context 2- global timeout. set using url option
timeout
default=120 secondsthe timeout with context will first try to cancel the current operation (which need network read/write) the global timeout will stop blocking operation when server refuse to respond
Both of 1 and 2, we have set. Maybe we need print more debug logs for tracing. Thanks for answers, I need to wait until next time the problem arises and catch pprof profiles.
I find a bug may be related to this problem
sometime server will send data packet with data flag = 0x40 which means final packet so I should check for that and close the connection and send driver.ErrBadConn
and this is what I will do in next release
I also add new url option trace dir so debugging connection in parallel is easy. with this option the driver will create a trace file for each connection
Good news
We noticed this in sijms/go-ora/v2 v2.7.17 with Oracle Exadata ... reducing the number of active bind variables to < 3,500 greatly reduces the occurrences
We have a program running in production that has a query method like below. We set 30s read timeout and have multiple goroutines excuting this function for loop. srconn is connection pool shared among these goroutines, we set 15 connections as max limit actually.
Recently we have encountered some goroutines excuted timeout occasionally, logs below which is expected, but there's unexpected issue that one goroutine among these goroutines was blocking when executing query method above, never timeout, stopped logging. We forced restarting this program finally. So I wanna ask your help if there's some place handle exceptions in driver when using context with timeout.