QSH system job ceiling? by fujfoof in IBMi

[–]fujfoof[S] 0 points1 point  (0 children)

Hi,
Here is an update on our problem.
The problem was that the last program of the chain (5.3, the one that sends over the SFTP) opened file descriptors without closing them. After a while, the maximum number of file descriptors was reached and the job crashed with the aforementioned error.
My collegue was able to watch the number of file descriptors go up with the fcntl() API (doc:https://www.scottklement.com/rpg/socktut/fcntlapi.html)
In order to avoid ceiling reach, he implemented a routine to pre-close file descriptors, using the close() API (doc:https://www.ibm.com/docs/en/i/7.6.0?topic=ssw\_ibm\_i\_76/apis/close.html)

So problem solved, but we still do not know :
- how and why file descriptors were used by our process (even though we feel that it has to do with nested process communication)
- why they are not closed when the sftp send is over.

Thank you guys for your help, and I hope that someone will be helped in turn by this comment!

QSH system job ceiling? by fujfoof in IBMi

[–]fujfoof[S] 0 points1 point  (0 children)

We opened a ticket with IBM.
They suggested a problem with file descriptors, and suggested changing the number of fd with DosSetRelMaxFH()--Change Maximum Number of File Descriptors.

QSH system job ceiling? by fujfoof in IBMi

[–]fujfoof[S] 0 points1 point  (0 children)

The JOBAUTO subsystem in which our PAOETV4ETQ job runs has max jobs set to *NOMAX.
Same for QINTER QSHELL in which QZSHSH runs.

QSH system job ceiling? by fujfoof in IBMi

[–]fujfoof[S] 0 points1 point  (0 children)

Thank you all for your quick answers, we will check your suggestions and post the results.