Salesforce

How to programmatically check message queue usage (-pica, replication)

« Go Back

Information

 
TitleHow to programmatically check message queue usage (-pica, replication)
URL Name000029803
Article Number000149080
EnvironmentProduct: OpenEdge Replication
Version: 11.6x, 11.7x, 12.x
OS: All supported platforms
Question/Problem Description
How to check message queue set with the -pica parameter Programmatically?
Can the Replication Message Queue usage be monitored with a VST query?
 
Steps to Reproduce
Clarifying Information
Error Message
Defect NumberEnhancement OE00219042 / PSC00242727
Enhancement Number
Cause

 
Resolution

A source database's message replication queue values can be seen in PROMON, Database Service Manager :

PROMON > 1. Status Displays > 16. Database Service Manager

The Replication Service Queue fields are associated with the plugin manager service queue which is used by OpenEdge Replication to manage the streaming of after image blocks.

A plugin manager service queue VST (_DbServiceManager) to monitor a database's message queue replication information using VSTs (Virtual System Tables) programmatically was introduced in OpenEdge 11.6. These are outlined in:

Typically monitor the "Free Message Entries" versus the "Total Message Entries".
  • _DbServiceManager._DbSvcMgr-TotalMsgEntries
  • _DbServiceManager._DbSvcMgr-FreeMsgEntries
A useful metric is : _DbSvcMgr-PicaFilled, any value higher than zero, indicates over the time-period of the metric gathering source database performance was affected due to restricted available pica queue entries. This typically manifests as application performance degradation, hanging or stalled login processes that first run application code to update the database. As the queue clears, access is restored.

A use-case example is to periodically check the PICA-Q and take action when the Free Entries fall within a percentage of Total Entries:
DEFINE VARIABLE  ipicapct AS INTEGER NO-UNDO INIT 5.

monitorblock:
REPEAT:
    PAUSE 20 NO-MESSAGE.
    FOR EACH _DbServiceManager NO-LOCK:
        DISPLAY _DbSvcMgr-TotalMsgEntries _DbSvcMgr-FreeMsgEntries ((_DbSvcMgr-FreeMsgEntries / _DbSvcMgr-TotalMsgEntries) * 100).

        IF ((_DbSvcMgr-FreeMsgEntries / _DbSvcMgr-TotalMsgEntries) * 100 ) < ipicapct THEN
            DO:
                FIND FIRST _connect WHERE _connect._Connect-Type = "RPLS" NO-LOCK NO-ERROR.
                IF AVAILABLE (_connect) THEN
                    DO:
                        OS-COMMAND SILENT VALUE("dsrutil " + DBNAME + " -C terminate server").
                         PAUSE 60 NO-MESSAGE.
                        OS-COMMAND SILENT VALUE("dsrutil " + DBNAME + " -C RELWAITS").
                        LEAVE monitorblock.
                    END.
            END.
    END.
END.

The source database pica queue size should be further increased to compensate during these periods when the AIW is queuing messages faster than the RPLS can read AI blocks to send to the target. While further attention to assisting the replication server's workload during peak transaction activity by:
  • improving network bandwidth,
  • target server performance and
  • target database tuning.
Workaround

 
Notes
Keyword Phrase
Last Modified Date11/20/2020 6:53 AM

Powered by