Re: How to identify the jboss tread number inside Oracle 12.2.x

From: Mikhail Velikikh <mvelikikh_at_gmail.com>
Date: Sat, 17 Apr 2021 18:48:27 +0100
Message-ID: <CALe4Hpk6LsuGTaUnSZy7avq-v+CBDHMn2-1bUudfur-H_oNOHw_at_mail.gmail.com>



Hey,

I would use V$SESSION.PORT. Then you can use netstat/ss on your app server to see what process is listening on that port. It sounds like you want to implement your own Dead Connection Detection (DCD) mechanism:
https://www.oracle.com/technetwork/database/enterprise-edition/oraclenetdcd-2179641.pdf

Additionally please take a look at:
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_IDLE_TIME.html https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_IDLE_BLOCKER_TIME.html

I see that MAX_IDLE_TIME is in 12.2. MAX_IDLE_BLOCKER_TIME is not there, but you can do the same via Database Resource Manager (DBRM): https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_RESOURCE_MANAGER.html#GUID-8EC6C735-338D-46D4-B346-AD16D0622B30

You can also use profiles to set IDLE_TIME: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/CREATE-PROFILE.html#GUID-ABC7AE4D-64A8-4EA9-857D-BEF7300B64C3 The MOS article discussing how some of these restrictions relate to one another:
A discussion of Dead Connection Detection, Resource Limits, V$SESSION, V$PROCESS and OS processes (Doc ID 601605.1)

Best regards,
Mikhail Velikikh

On Sat, 17 Apr 2021 at 14:22, Eriovaldo Andrietta <ecandrietta_at_gmail.com> wrote:

> Hello,
>
> I have the following scenario in Oracle 12.2.x:
>
> Sometimes, connections that are opened by Jboss (connection pool) stay
> INACTIVE in the gv$session and with the event "waiting for the client to
> respond" and if they are in transaction, they get locked in the gv$lock.
> In my concern , it happens because the Jboss lost the connection with the
> database server while running.
>
> The Application has a timeout configured and also has a process to do the
> node redir in intervals of 24 hours.
>
> I would like to know if there is a way in Oracle to identify the number of
> the Jboss thread that opened the connection in order to track in the
> application server and check if it is still active.
>
> Regards
> Eriovaldo
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Apr 17 2021 - 19:48:27 CEST

Original text of this message