Tuesday, November 16, 2021

ORA-41429: non-replayable side effect on failed connection | During a Session Failover

 Problem:

 On a 19c RAC environment, When one node crashed; a session connecting through a service that supports Application Continuity (AC) option failed to fail over to the other active RAC nodes and got disconnected with below error:

 ORA-41429: non-replayable side effect on failed connection
 

Analysis:

Starting from Oracle 12.2 Application Continuity (AC) feature on RAC environment allows the sessions to failover from the crashed/stopped Node instance to the active RAC Node without losing the current running Queries or DMLs except DDLs, DDLs will not be able to fail over throwing ORA-41429 error.

Moreover,; If a session has ran a DDL in the past during its lifetime; it will not be able to fail over and will throw ORA-41429 error; even if it was running a replayable statement like a Query or a DML during the failover. 

In case you face this error while testing a service for the Application Continuity feature, make sure to not run any DDLs from that session in order to get accurate failover results.

Looks weird! But this is how it works!

Monday, November 15, 2021

ARG_MAX limitation cause Argument list too long Error

Error:

While trying to send an HTML Email, I was getting below error due to the big Email body (which was embedded inside SENDMAILARGS variable:

 Argument list too long



Analysis:

This is due to the maximum length of an argument command in Linux which is controlled by ARG_MAX parameter, you can view the value of this parameter using this command: [Value is in Bytes]

# getconf ARG_MAX


Solution:

In a nutshell, ARG_MAX represent 25% of the Stack size; which means if we increase the Stack size; this will increase the ARG_MAX limit too.

Current Stack size can be viewed using this command: [Value is in KB]

# ulimit -s

To increase the Stack size:

 # ulimit -s 20240

Let's check the value of ARG_MAX after increasing the Stack size:


Please note that this change happen to the current session only, in case you want to increase the Stack size permanently for all new sessions, you have to change the Stack size value in /etc/security/limits.conf