ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Scott Klement OPNPIPE failing "Too many Open files for this process"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott Klement OPNPIPE failing "Too many Open files for this process"

    From CL to access UNIX within IBM I job, I use Scott Klement's OPNPIPE, RCVPIPE, CLOPIPE with PASE. It's been working since past 6 months but now as volume is increasing, OPNPIPE is failing with error "Too many Open files for this process". As recommended I am always closing pipes using CLOPIPE so not sure why the error. After job is bounced (as it closes all open files), it works fine. This IBM I job is part of sub-system which is bounced weekly so an interim solution we are planning to bounce this job daily to reset file open limit. But not sure what is the root cause and how to fix it. I would appreciate suggestions from the group.

    8707 - OPNPIPE
    CMD(X'97A8A3889695F3406189838561839381A2A26197A861 81979761868995898389A3
    A861A2998361A5968981958193A8A38983A24B97A840C9C3C4 E3C1F140F0F2F1F8F740F0
    F0F1F4F7F1F040F0F0F0F0F0F0F2F8F1F0F1F8F3F5F240F200 ') TYPE(*PASE)
    Too many open files for this process.
    15500 - SNDPGMMSG MSGID(SY70014) MSGF(SYINTMSGF) MSGDTA(' ')
    TOMSGQ(*SYSOPR)
    16100 - RCVMSG MSGTYPE(*NEXT) MSGKEY(*TOP) MSGDTA(&ERRDTA) MSGID(&MSGID)
    SEV(&SEV) MSGF(&MSGF) MSGFLIB(&MSGFLIB)
    17800 - SNDPGMMSG MSGID(CPF9897) MSGF(*LIBL/QCPFMSG) MSGDTA('Too many
    open files for this process.') TOMSGQ(*SYSOPR)
    16100 - RCVMSG MSGTYPE(*NEXT) MSGKEY(*TOP) MSGDTA(&ERRDTA) MSGID(&MSGID)
    SEV(&SEV) MSGF(&MSGF) MSGFLIB(&MSGFLIB)
    - RETURN /* RETURN due to end of CL program */

    Additional Message Information

    Message ID . . . . . . : CPF9897 Severity . . . . . . . : 40
    Message type . . . . . : Diagnostic
    Date sent . . . . . . : 08/05/20 Time sent . . . . . . : 19:52:18

    Message . . . . : Too many open files for this process.
    Cause . . . . . : No additional online help information is available.

    Display Message Details

    Message ID . . . . . . : CPF9897 Severity . . . . . . . : 40
    Date sent . . . . . . : 08/05/20 Time sent . . . . . . : 19:52:18
    Message type . . . . . : Diagnostic
    From . . . . . . . . . : ICESYS CCSID . . . . . . . . : 65535

    From program . . . . . . . . . : UNIXPIPER4
    From library . . . . . . . . : ICOBJ1
    From module . . . . . . . . : UNIXPIPER4
    From procedure . . . . . . . : REPORTERROR
    From statement . . . . . . . : 83100

    To program . . . . . . . . . . : UNIXPIPER4
    To library . . . . . . . . . : ICOBJ1
    To module . . . . . . . . . : UNIXPIPER4
    To procedure . . . . . . . . : REPORTERROR
    To statement . . . . . . . . : 83100

  • #2
    The system allows you to have up to 200 (-ish) total file descriptors open simultanteously in a job. A file descriptor is opened each time you create a socket (network connection), open a stream file (IFS file) or a pipe.

    Every time I've seen this error, it is because there was a bug where something was opened but never closed.

    Remember: This is a total per job. So it could be that you're forgetting to close the pipe, and after 200 times you run out... but it doesn't HAVE to be, it could be anywhere in the job that one of these things is opened but never closed, and the OPNPIPE just happens to be the "straw that breaks the camel's back".

    Comment


    • SyedIndiana
      SyedIndiana commented
      Editing a comment
      Thanks for reply Scott. So far this issue occurred couple of times and every time while OPNPIPE, so just wanted to make sure there is no known bug in CLOPIPE which skips actual closing.

      As CLOPIPE is coded for each OPNPIPE, I suspected other places in code and trying to find it with help of iDoctor. I will keep looking through manual code review as well.
Working...
X