cancel
Showing results for 
Search instead for 
Did you mean: 

DB Session-Problem

Former Member
0 Kudos

Hi

We have a problem with the DB-Session-Handling.

We have a Communication Channel, that reads data from the database.

We open and close this channel from extern via a scheduling-tool.

Each time when the channel starts and stops 5 minutes later, it opens a new db session and the session remains open with status "INACTIVE". After a short time it fills alle available sessions and nothing work until we restart the database.

Is there a flag we need to set, so that PI closes the DB-Session when the channel stops?

Thanks

Rico

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Assuming that the DB is Oracle, please look at the parameter idle_time to drop a DB connection if it is idle for a certain duration.

Former Member
0 Kudos

Rico,

Have you tried using the option "Disconnect from Database After Processing Each Message" in sender JDBC channel?

Although I am not too sure how come with every new call, a new session is being opened. I believe JDBC channel opens one session and if you don't disconnect that session, it continues till the time connection discontinues for some reason.

Regards,

Neetesh

Former Member
0 Kudos

Neetesh

Yes I tried it with flaged "Disconnect from Database After Processing Each Message".

That works. But it starts and stops the session with each iteration.

I looked for a option to start the session when we start the adapter/channel and when we stop the adapter/channel the session should stop. So that the session will be open during all iteration (e.g. 5 times) while the adapter runs.

Thanks

Rico

Former Member
0 Kudos

Rico,

That works. But it starts and stops the session with each iteration.

What do you mean by "starts and stops the session with each iteration"? This option means that the database connection is to be released and reestablished before every poll interval. If the polling interval is not significantly small (say 30-45 secs), then using this option won't hurt the performance.

I looked for a option to start the session when we start the adapter/channel and when we stop the adapter/channel the session should stop. So that the session will be open during all iteration (e.g. 5 times) while the adapter runs.

Why you want one session with the DB? If disconnection with DB is not affecting the performance, I don't think there is any use in having continuous connectivity.

Please elaborate your requirement which is restricting in using this option.

Regards,

Neetesh

Former Member
0 Kudos

Neetesh

It allways starts a session when the channel starts, but the session is still open when the channel stops. so I looked for a solution to stop the session. In my opinion PI should handle (stop) the session, when it open it automaticly.

But now we will flag "Disconnect from Database After Processing Each Message". That works fine for us.

Regards

Rico