IBM Support

Listing Message Queues that are at 90% or higher full

Troubleshooting


Problem

How to find message queues that are full or approaching a 90% full threshold.

Symptom

Application Jobs fail to send messages to the Message Queue.  Jobs are getting error "CPF2469 - Error occurred when sending message&1."

Cause

Message Queues have a Maximum size of 16MB, once the maximum has been reached, you can no longer add messages to the Message Queue.

Diagnosing The Problem

Create a report using the  OBJECT_STATISTICS table function to get a listing of Message Queues that are 90% full or higher.
1) Open the ACS Run SQL Scripts tool 
2) Run the following SQL:
SELECT OBJNAME AS Message_Queue,
       OBJLIB AS Library,
       OBJTYPE AS Object_type,
       OBJSIZE AS Object_Size_in_bytes,
       DECIMAL(OBJSIZE * 100 / 16000000, 5, 2) AS Percent_full,
       CASE
           WHEN DECIMAL(OBJSIZE * 100 / 16000000, 5, 2) >= '100' THEN 'Message Queue is FULL'
           WHEN DECIMAL(OBJSIZE * 100 / 16000000, 5, 2) > '90' THEN 'Reduce Messages in Queue'
       END AS Message_queue_threshold,
       OBJTEXT
    FROM TABLE (
            QSYS2.OBJECT_STATISTICS('*ALL', '*MSGQ')
        )
    WHERE objsize > '14400000' --- 14,400,000 bytes is 90% of the 16MB Maximum size for MSGQ
image-20240619085047-2

Resolving The Problem

  • Delete Messages in the Message queue by using the command:
    • DSPMSG MSGQ(xxxxxxx)   and using options F11=Remove a message, F13=Remove all  or F16=Remove all except unanswered 
  • Clear all messages in the Message queue by using the command:
    • CLRMSGQ MSGQ(xxxxxxx)  >>  The command will clear all messages in the message queue including  unanswered inquiry messages

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p000000GnvrAAC","label":"Job and Work Management-\u003EQHST \/ QSYSOPR MSGQ"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0;7.3.0;7.4.0;7.5.0"}]

Document Information

Modified date:
19 June 2024

UID

ibm17157969