Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

All connections become busy #31

Open
rsasai opened this issue Jul 14, 2015 · 4 comments
Open

All connections become busy #31

rsasai opened this issue Jul 14, 2015 · 4 comments

Comments

@rsasai
Copy link

rsasai commented Jul 14, 2015

Hi Tim

I have got the connection issue with HANA. It's been all fine with Mysql.
My application runs fine but after a while it hangs within jdbc-module, to be precise, here:

private void doSelect( Message<JsonObject> message ) {
    Connection connection = null ;
    try {
      connection = poolMap.get( address ).getConnection() ;  // <<== here
      doSelect( message, connection, null ) ;

I found out that busy connections keep increasing in the connection pool:

pool-status: {"connections":0,"idle":0,"busy":0,"orphans":0,"status":"ok"}
pool-status: {"connections":5,"idle":5,"busy":0,"orphans":0,"status":"ok"}
...
pool-status: {"connections":5,"idle":1,"busy":4,"orphans":0,"status":"ok"}
pool-status: {"connections":5,"idle":0,"busy":5,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":5,"busy":5,"orphans":0,"status":"ok"}
...
pool-status: {"connections":10,"idle":2,"busy":8,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":1,"busy":9,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":0,"busy":10,"orphans":0,"status":"ok"}
pool-status: {"connections":15,"idle":5,"busy":10,"orphans":0,"status":"ok"}
...
pool-status: {"connections":15,"idle":1,"busy":14,"orphans":0,"status":"ok"}
pool-status: {"connections":15,"idle":0,"busy":15,"orphans":0,"status":"ok"}
pool-status: {"connections":20,"idle":5,"busy":15,"orphans":0,"status":"ok"}
...
pool-status: {"connections":20,"idle":1,"busy":19,"orphans":0,"status":"ok"}
pool-status: {"connections":20,"idle":0,"busy":20,"orphans":0,"status":"ok"}

This is as far as I can go. Could you please advise?
Thank you.
-Uppsax

@timyates
Copy link
Owner

Does this happen no matter what your queries are?

Do connections never get returned to the pool? Or is it only in certain
situations?

Does the driver you use work with connection pools outside of vertx?
On 14 Jul 2015 10:49, "Ryu Sasai" [email protected] wrote:

Hi Tim

I have got the connection issue with HANA. It's been all fine with Mysql.
My application runs fine but after a while it hangs within jdbc-module, to
be precise, here:

private void doSelect( Message message ) {
Connection connection = null ;
try {
connection = poolMap.get( address ).getConnection() ; // <<== here
doSelect( message, connection, null ) ;

I found out that busy connections keep increasing in the connection pool:

pool-status: {"connections":0,"idle":0,"busy":0,"orphans":0,"status":"ok"}
pool-status: {"connections":5,"idle":5,"busy":0,"orphans":0,"status":"ok"}...
pool-status: {"connections":5,"idle":1,"busy":4,"orphans":0,"status":"ok"}
pool-status: {"connections":5,"idle":0,"busy":5,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":5,"busy":5,"orphans":0,"status":"ok"}...
pool-status: {"connections":10,"idle":2,"busy":8,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":1,"busy":9,"orphans":0,"status":"ok"}
pool-status: {"connections":10,"idle":0,"busy":10,"orphans":0,"status":"ok"}
pool-status: {"connections":15,"idle":5,"busy":10,"orphans":0,"status":"ok"}...
pool-status: {"connections":15,"idle":1,"busy":14,"orphans":0,"status":"ok"}
pool-status: {"connections":15,"idle":0,"busy":15,"orphans":0,"status":"ok"}
pool-status: {"connections":20,"idle":5,"busy":15,"orphans":0,"status":"ok"}...
pool-status: {"connections":20,"idle":1,"busy":19,"orphans":0,"status":"ok"}
pool-status: {"connections":20,"idle":0,"busy":20,"orphans":0,"status":"ok"}

This is as far as I can go. Could you please advise?
Thank you.
-Uppsax


Reply to this email directly or view it on GitHub
#31.

@ryss828
Copy link

ryss828 commented Jul 14, 2015

Thank you for your reply.

Does this happen no matter what your queries are?

No, always SELECT. The other one I use is INSERT.

Do connections never get returned to the pool? Or is it only in certain
situations?

I have to look into log. I can answer this next time.

Does the driver you use work with connection pools outside of vertx?

I don't know... is there way to figure this out? It's one and only HANA
jdbc driver: ngdbc.jar.
http://help.sap.com/saphelp_hanaplatform/helpdata/en/ff/15928cf5594d78b841fbbe649f04b4/content.htm

I will try to make a small application that will cause this issue on
Thursday.

Thanks a lot.
Uppsax

On 14 July 2015 at 19:55, Tim Yates [email protected] wrote:

Does this happen no matter what your queries are?

Do connections never get returned to the pool? Or is it only in certain
situations?

Does the driver you use work with connection pools outside of vertx?

On 14 Jul 2015 10:49, "Ryu Sasai" [email protected] wrote:

Hi Tim

I have got the connection issue with HANA. It's been all fine with Mysql.
My application runs fine but after a while it hangs within jdbc-module,
to
be precise, here:

private void doSelect( Message message ) {
Connection connection = null ;
try {
connection = poolMap.get( address ).getConnection() ; // <<== here
doSelect( message, connection, null ) ;

I found out that busy connections keep increasing in the connection pool:

pool-status:
{"connections":0,"idle":0,"busy":0,"orphans":0,"status":"ok"}
pool-status:
{"connections":5,"idle":5,"busy":0,"orphans":0,"status":"ok"}...
pool-status:
{"connections":5,"idle":1,"busy":4,"orphans":0,"status":"ok"}
pool-status:
{"connections":5,"idle":0,"busy":5,"orphans":0,"status":"ok"}
pool-status:
{"connections":10,"idle":5,"busy":5,"orphans":0,"status":"ok"}...
pool-status:
{"connections":10,"idle":2,"busy":8,"orphans":0,"status":"ok"}
pool-status:
{"connections":10,"idle":1,"busy":9,"orphans":0,"status":"ok"}
pool-status:
{"connections":10,"idle":0,"busy":10,"orphans":0,"status":"ok"}
pool-status:
{"connections":15,"idle":5,"busy":10,"orphans":0,"status":"ok"}...
pool-status:
{"connections":15,"idle":1,"busy":14,"orphans":0,"status":"ok"}
pool-status:
{"connections":15,"idle":0,"busy":15,"orphans":0,"status":"ok"}
pool-status:
{"connections":20,"idle":5,"busy":15,"orphans":0,"status":"ok"}...
pool-status:
{"connections":20,"idle":1,"busy":19,"orphans":0,"status":"ok"}
pool-status:
{"connections":20,"idle":0,"busy":20,"orphans":0,"status":"ok"}

This is as far as I can go. Could you please advise?
Thank you.
-Uppsax


Reply to this email directly or view it on GitHub
#31.


Reply to this email directly or view it on GitHub
#31 (comment)
.

@rsasai
Copy link
Author

rsasai commented Jul 30, 2015

Hi
I found out the following:

  • If it's a 'legitimate error' like 'unique constraint violated' then the connection is returned to the pool.
  • If it's a 'stupid error' like issuing 'INSERT IIINTO ...' then the connection will become busy for ever.

-Uppsax

@timyates
Copy link
Owner

I'll have a look and see if there is anything I can do my end...

On 30 July 2015 at 15:25, Ryu Sasai [email protected] wrote:

Hi
I found out the following:

  • If it's a 'legitimate error' like 'unique constraint violated' then
    the connection is returned to the pool.
  • If it's a 'stupid error' like issuing 'INSERT IIINTO ...' then the
    connection will become busy for ever.

-Uppsax


Reply to this email directly or view it on GitHub
#31 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants