Re: Can we control which CGI job is used?

Dave <[email protected]> Wed, 24 Aug 2022 11:25:55 +0200
Newsgroups gmane.comp.systems.as400.web
Message-ID <CAEw=R=t=cF-fNYk-iy4fy_0xbKt016oiZopgMYVYWmuFYUzVjg@mail.gmail.com>
   - *Subject*: Re: Can we control which CGI job is used?
   - *From*: Nathan Andelin <nandelin@xxxxxxxxx>
   - *Date*: Tue, 23 Aug 2022 09:30:34 -0600

------------------------------

Multiple simultaneous HTTP requests are handled by multiple CGI jobs.Similar
to telnet. One user, one session, one job.

For each of the 5 CGI jobs, the current user is QTMHHTP1.


On Tue, 23 Aug 2022 at 16:59, Dave <[email protected]> wrote:

> I'm not sure what you mean about making the CGI persistent. So that the
> program stays running within the job? That would mean extensive recoding
> and how would it help with multiple simultaneous http requests?
>
> We have 2 other similar web services running in production. They also have
> 5 CGI jobs running but only 2 ever seem to get used.
>
>
>
>
>    - *Subject*: Re: Can we control which CGI job is used?
>    - *From*: Nathan Andelin <nandelin@xxxxxxxxx>
>    - *Date*: Sat, 20 Aug 2022 07:27:33 -0600
>
> ------------------------------
> You're right that the main multi-threaded HTTP server job routes CGI
> requests to "available" CGI Jobs, normally. But you also have the option of
> coding for persistent CGI. See the manual for examples.
>
>
> On Fri, Aug 19, 2022 at 9:00 AM Brad Stone <bvstone@xxxxxxxxx> wrote:
>
> Add a *PSSR to your program(s). :)
>
>
> On Fri, Aug 19, 2022 at 9:10 AM Dave <dfx1@xxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> If my CGI program crashes, I thought that the nexavailable CGI job would
>
> be
>
> used for further http requests. Apparently not, they return with an error
> http 500.
> Is there anything that can be done to change this behaviour?
>
> My http.conf :
> StartCGI 5
> #HotBackup Off
>
> So I have 2 groups of 5 CGI jobs each running program QZSRCGI. The first
> job remains in MSGW condition. I believe that if another request was made
> from another client while the first job was still occupied, then the next
> available CGI job would be used.
>
> What condition needs to be met so that the request uses the instances 2
>
> to
>
> 5 of my server jobs?
> --
> This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
> list
> To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/web400.
>
>
> On Fri, 19 Aug 2022 at 16:10, Dave <[email protected]> wrote:
>
>> Hi,
>>
>> If my CGI program crashes, I thought that the nexavailable CGI job would
>> be used for further http requests. Apparently not, they return with an
>> error http 500.
>> Is there anything that can be done to change this behaviour?
>>
>> My http.conf :
>> StartCGI            5
>> #HotBackup Off
>>
>> So I have 2 groups of 5 CGI jobs each running program QZSRCGI. The first
>> job remains in MSGW condition. I believe that if another request was made
>> from another client while the first job was still occupied, then the next
>> available CGI job would be used.
>>
>> What condition needs to be met so that the request uses the instances 2
>> to 5 of my server jobs?
>>
>>
>>
-- 
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.