-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't close connection with Out parameter Object type with field type CLob(string) #321
Comments
For fix, minimun need add code:
|
The suggested fix will not work, as more than one Read may be required. I cannot reproduce the error. |
How to reproduce two(ore more) read?
|
I reproduced multiple reading: i make in database clob 40000+ length.
And all ok. All clob save. And in log i see:
|
Describe the bug
If use out Oracle object with field type CLOB, the connection is not closed.
To Reproduce
Oracle type
Golang:
Expected behavior
All test OK - if use variable type Object with field type of clob, session closed and pool can reuse for new connection.
For this need add code:
lob.go
func (dlr *dpiLobReader) Read(p []byte) (int, error)
Error output
time=2023-12-03T15:42:03.258+07:00 level=DEBUG source=C:/Temp_folder/golang/OracleNew/godror-main/conn.go:1117 msg="ResetSession re-acquire session" pool="gin2\tfc44cd87\tfsgdev\t1\t3\t1\t2s\t30s\t10s\tfalse\tfalse\tfalse\tUTC\t0\t0s"
result 3 0 pool=0x1d074d176a0 stats=busy=3 open=3 max=3 maxLifetime=30s timeout=10s waitTimeout=5s params={authMode:0 connectionClass:0x1d07bb80690 connectionClassLength:6 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool:0x1d074d176a0 tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24496: OCISessionGet() timed out waiting for a free connection.
start Out clob 4
result 4 0 pool=0x1d074d176a0 stats=busy=3 open=3 max=3 maxLifetime=30s timeout=10s waitTimeout=5s params={authMode:0 connectionClass:0x1d07bb806b0 connectionClassLength:6 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool:0x1d074d176a0 tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-24496: OCISessionGet() timed out waiting for a free connection.
Your oracle client version
e.g. 12.2.0
Your godror version
e.g. v0.40.4
Your go version
e.g. 1.21
Your gcc version
e.g. 10.3.0
Machine (please complete the following information):
OS: windows
Architecture: x86_64
Version: 10
The text was updated successfully, but these errors were encountered: