Hi Richard and Joe,

Thanks for the tips thus far.

The application is using the AS400 object connection pool. I don’t know if the connection pooling is set up correctly - I have my doubts as there are thousands of new connections each hour during the peak timeframes.

There is not an accumulation of data queue server jobs. They start, handle a request, then end. I was expecting them to be reused and go back to PWRW state, but they do not.
The number of job started (CPF1124), job ended (CPF1164), and user connected (CPIAD09) messages for the QZHQSSRV jobs is almost identical throughout each hour of the day.

I had previously found the documentation both of you pointed me to, but I cannot find anything that talks about the reuse of the QZHQSSRV prestart jobs.


When the application does a disconnectService or a disconnectAllServices, is that what causes the QZHQSSRV job to end? (As in CPF1164 end, not go back to PSRW state and wait for the next request).

If so, is this perhaps an indication the application is not properly using the connection pool, but rather connecting and disconnecting to the data queue server?


I’m sorry if these are vague, basic questions, but this is completely out of my area of expertise, but I’ve been asked to help understand why the prestart jobs are not reused.

I am trying to figure out just enough to ask the right questions for the application team…. they are Linux developers, not IBM i experts.

Dawn


On Jan 8, 2020, at 6:03 PM, Richard Schoen <richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>> wrote:

I don't believe Data Queues use connection pooling like JDBC would for a database. However I think you can have an IBMi/AS400 object connection pool that can be re-used. And those connections are used to start/connect-send/receive-disconnect from the data queue service jobs.

When you use a data queue you grab an existing connection or start a new IBMi connection, instantiate the data queue, do work and disconnect it. See this article link from the docs for a short code example: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzahh/dtaq.htm

To me it sounds like whoever did the app coding is possibly starting new connections and then never closing them perhaps. Then at the end of the thread/interaction the running IBMi background data queue job is left running and orphaned. Thus the never-ending stream of new jobs.

Would be hard to say without seeing code. But the sample I referenced should be easy to follow.

Hope this helps.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>
----------------------------------------------------------------------

message: 1
date: Wed, 8 Jan 2020 15:30:46 +0000
from: Dawn May <dawnmayican@xxxxxxxxxxx<mailto:dawnmayican@xxxxxxxxxxx>>
subject: Data Queue Prestart Server Job (QZHQSSRV) Reuse

Hello,

I am working with an application that has a Linux web front end (Tomcat) that communicates to the IBM i via data queues using the Java toolbox.

The data queue server jobs (QZHQSSRV) are never reused.
This has been verified by reviewing the PRESTART_JOB_REUSE_COUNT column returned by the QSYS2.ACTIVE_JOB_INFO() service. PRESTART_JOB_REUSE_COUNT is always 1. In addition, the number of CPF1124/CPF1164 messages is nearly identical to the number of CPIAD09 (User &4 from client &8 connected to job) messages logged to the history log.

There are hundreds to thousands of connections each hour and each connection results in a new job. I?d like to have the jobs be reused to reduce the overhead of a new job for every connection.
I also need to verify that the implementation of connection pooling is done correctly and I?m not sure if this is related.

Are these data queue server jobs supposed to be reused?
The prestart job entries are shipped with MAXUSE(200), so I assumed they should be able to be reused, but is my assumption incorrect?

Is the application supposed to open/close connections in a specific manner that determines whether the job is ended or reused?

The application has configured connection pooling, but the MaxUseTime and MaxLifeTime values are only 5 minutes, which seem small to me.
Could these values play a factor in why jobs are not reused?


I have tried to do this investigation via Internet searches, but I have found no information about reusing these jobs.

The closest thing I stumbled upon was this old thread in this mailing list:
https://archive.midrange.com/java400-l/200604/msg00048.html

But that talked about ending the jobs and I want to know how to reuse the jobs.


I do not have much experience with the Java toolbox interfaces using the data queue server jobs, so any information that may be helpful would be appreciated.

Thanks,

Dawn

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].