Friday, March 11, 2022

Unbalanced oacore connection number

By default, Active Connections Count is not balanced in R12.2 when multiple oacore services are used:

In the Console, navigate to to Services (tree link) -> Data Sources (tree link) -> EBSDataSource (page link) -> Monitoring (tab), I got
Server ActiveConnectionsAverageCount ActiveConnectionsCurrentCount CurrentCapacity LeakedConnectionCount 
oacore_server1     40 42 48 1292
oacore_server2     13 13 18 310

The Active Count shall match from another navigation in identifying active user / oacore counts:
Click on Environments => Servers => oacore => Monitoring (tab) => JDBC (tab) that will only show oacore. In fact it will only show the oacore you selected. Lets say you chose oacore_server1 from the oacore cluster. It will not show oacore_server_2

Query showed unbalanced user sessions as well:
SQL> select a.node_name, 'Number of user sessions : ' || count(distinct b.session_id) How_many_user_sessions 
from apps.fnd_nodes a,apps.icx_sessions b
where disabled_flag != 'Y' and PSEUDO_FLAG = 'N'
and (last_connect + decode(apps.FND_PROFILE.VALUE('ICX_SESSION_TIMEOUT'),
NULL,limit_time, 0,limit_time,apps.FND_PROFILE.VALUE('ICX_SESSION_TIMEOUT')/60)/24) > sysdate
and a.node_id=b.node_id and counter < limit_connects group by a.node_name
/

NODE_NAME  HOW_MANY_USER_SESSIONS
------------------ --------------------------------------
EBSAPP1P       Number of user sessions : 144
EBSAPP2P       Number of user sessions : 53

In normal situations, there are two oacore servers, the $CONTEXT_FILE, apps.conf and mod_wl_ohs.conf should include all oacore servers setup including port number.

Here is an example of typical configuration to fix this:

1. $CONTEXT_FILE:

<oacore_server_ports oa_var="s_oacore_server_ports">oacore_server1:7201,oacore_server2:7202</oacore_server_ports>
<oacore_nodes oa_var="s_oacore_nodes">[HOSTNAME]:7201,[HOSTNAME]:7202</oacore_nodes>

2. $IAS_ORACLE_HOME/instances/EBS_web_[SID]_OHS1/config/OHS/EBS_web_[SID]/apps.conf:

######################
# for oacore
######################
<Location /OA_MEDIA>
ProxyPass balancer://oacorecluster_oamedia
ProxyPassReverse balancer://oacorecluster_oamedia
</Location>
<Proxy balancer://oacorecluster_oamedia>
BalancerMember http://[HOSTNAME]:7202/OA_HTML/media
BalancerMember http://[HOSTNAME]:7201/OA_HTML/media
</Proxy>

<Location /OA_JAVA>
ProxyPass balancer://oacorecluster_oajava
ProxyPassReverse balancer://oacorecluster_oajava
</Location>
<Proxy balancer://oacorecluster_oajava>
BalancerMember http://[HOSTNAME]:7202/OA_HTML/classes
BalancerMember http://[HOSTNAME]:7201/OA_HTML/classes
</Proxy>

<Location /OA_CGI/FNDWRR.exe>
ProxyPass balancer://oacorecluster_oacgi/OA_HTML/txkFNDWRR.pl
ProxyPassReverse balancer://oacorecluster_oacgi/OA_HTML/txkFNDWRR.pl
</Location>
<Proxy balancer://oacorecluster_oacgi/OA_HTML/txkFNDWRR.pl>
BalancerMember http://[HOSTNAME]:7202
BalancerMember http://[HOSTNAME]:7201
</Proxy>

3. $IAS_ORACLE_HOME/instances/EBS_web_[SID]_OHS1/config/OHS/EBS_web_[SID]/mod_wl_ohs.conf:

<Location /OA_HTML>
SetHandler weblogic-handler
WebLogicCluster [HOSTNAME]:7202,[HOSTNAME]:7201
WLTempDir ${ORACLE_INSTANCE}/tmp
</Location>

This oacore issue was fixed after manually modified files: mod_wl_ohs.conf and apps.conf to add the lost oacore setup. Doc ID 2224190.1

Seems AutoConfig does not update mod_wl_ohs.conf and apps.conf.

Below query "may" tell number of users' connections:
SQL> select count(distinct user_id) "USERS" from icx_sessions
where  last_connect > sysdate - 1/24 and user_id != '-1';
     USERS
-------------
        80

Reference (do not understand yet)
Data Source Active Connections Current Count exceeds Maximum Capacity of the Pool (Doc ID 1372488.1)

No comments: