Osuwariboy
Osuwariboy

Reputation: 1375

BIRT sessions stay open in Vertica

I'm having enormous problems managing connections in Vertica when developing BIRT reports. The basic idea is that sessions never die, so I always hit the connection cap. This is, of course, a problem, because then you can't use the database at all unless you do a close_all_sessions() to nuke everyone.

This happens at just about every level of development there is. First, in Esproc, when you develop the underlying logic... if there's a bug in your program before the connection.close(), the connection stays open and Esproc opens up a new one next execution. This adds up REALLY quickly when you have a couple of users developing stuff on the network.

Next, in Eclipse it's the same thing. You open a report and Eclipse creates a dozen connections that'll stay as long as you keep Eclipse open. Then, when you run the report, it'll create another bunch of connection, totally ignoring the ones it already has... and if you have bugs in your report, the dozen extras won't close.

Then on our website, same thing... problem running the report, boom, connections won't close EVER. I've had sessions stay open for two weeks with absolutely no activity. They only disappeared when I restarted Tomcat.

I'm at my whit's end here. There doesn't seem to be ANY way to set a session timeout in Vertica and I don't even know where to even begin looking to solve these problems. Everywhere I could find, the connection timeout was set to 20 seconds... so I would expect a connection to disappear after reaching that time, but of course that's not the case.

I really have no idea what to do here... and I'm desperate for some help here. Can anyone give me a clue? I've been at this for two days now and my brain just can't take anymore.

Upvotes: 1

Views: 212

Answers (1)

Dominique
Dominique

Reputation: 4342

You want to use a connection pool instead of a direct JDBC access, it will blow away connection issues on Tomcat and improve performances.

Visit this article for more informations.

  • Define the connection pool (CP) in [Tomcat home]/conf/server.xml
  • Link the CP to web applications in [Tomcat home]/conf/context.xml
  • Install Apache Probe or something similar on Tomcat, this will help to test if the CP is correctly defined.
  • in BIRT reports, use JNDI URL property to link a datasource to the CP

This will solve the problem for the website, but not for Eclipse designer though. Try to upgrade to the most recent birt & jdbc versions.

Upvotes: 1

Related Questions