cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyAPI is not closing jdbc connections

SOLVED
New Contributor

ReadyAPI is not closing jdbc connections

We are using JDBC request in ReadyAPI, but connection is not getting closed.

can anyone help, to close jdbc connections using ReadyAPI.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: ReadyAPI is not closing jdbc connections

nmrao, richie, thank you for help!

 

Hi @ashishshelke , did you solve the issue? If it still persists, I suggest that you contact support and describe the situation as minutely as possible to them. Let us know when you get a solution from them.



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post

5 REPLIES 5
Highlighted
Community Hero

Re: ReadyAPI is not closing jdbc connections

Hi @ashishshelke,

Can you provide a bit more info?

What RDBMS are you connecting to? (Oracle? SQLServer? Postgres?, etc.)

What makes you think the connection isn't being closed?

What version of ReadyAPI! are you using?

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Hero

Re: ReadyAPI is not closing jdbc connections

Since the tool does the connection and closing, I believe, users don't have control over the connection.
Do you still this issue if you close the tool?
By the way, how are you monitoring the connections?

Any ways, how do you use the tool? I mean the usage? If you have automated tests, then they can be executed from command line and as soon the execution is completed, there should not be any active sessions / connections to db.
If the usage is just limited to UI (tool), then probably no connections at least after closing the tool.

You may try the above to see if that is helpful. Otherwise, you may get in touch with support team.


Regards,
Rao.
Highlighted
New Contributor

Re: ReadyAPI is not closing jdbc connections

I am using Oracle database.

Because further connections are failing because of limited number of sessions.

we are checking the ACTIVE sessions using sql query on Oracle.

Highlighted
Community Hero

Re: ReadyAPI is not closing jdbc connections

Hi @ashishshelke,

I've used sql to close active sessions on Oracle before. It sounds like you've found the table already but just in case it was a table in the system schema/user.
It was a loooooong time ago though.....i think i did it on Oracle v9i....unsure whether dropping the row in the table for the session would work on later versions, but that's how i did it before cos the sessions weren't being released back to the pool by the application.

You state that "further connections arent working because a limited number of sessions". Have you actually determined whats going on regarding the db connections? Are you saying that each test which has a JDBC step isnt releasing its db connection? Or is the nonrelease of the connection occurring each time you execute the whole soapui project? Understanding how the connections are being built up (once per test, etc.) without being released will help you identify how to get around it if the SQL option no longer works. Are you running in sequential or parallel mode? I would expect ReadyAPI! to release connections backs to the pool as soon as its not needed, so i'd double check there isn't something else going on on the oracle side that isnt the cause of the nonrelease of the connections

Oh...just as an aside...i ALWAYS add semi colons at the end of my SQL statements. I know its no longer mandatory, but still helps the RDBMS know that is the end of the executable SQL, it cant hurt and can only help so id make sure you are ending your statements with a semi colon.

As Rao said....contact support, but also there's a number or stackoverflow posts about killing a db connection using java....perhaps you could look at these to kill it if deleting the session row/truncating the table doesnt work (like it used to) using SQL.

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Manager

Re: ReadyAPI is not closing jdbc connections

nmrao, richie, thank you for help!

 

Hi @ashishshelke , did you solve the issue? If it still persists, I suggest that you contact support and describe the situation as minutely as possible to them. Let us know when you get a solution from them.



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post