× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks,
I'd forgotten to check into that.
I have a feeling I remember seeing a display that indicated how many
descriptors were open but can't recall off the top of my head.

BTW, can you comment on your reason for opening the 1st 3 descriptors
while commencing a java object group.

Peter

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, 11 August 2009 7:05 p.m.
To: RPG programming on the IBM i / System i
Subject: Re: HTTPAPIR4 exception

Hi Peter,

The Unix-type APIs use something called a "Descriptor". Every time a
new IFS file is opened, a new socket is created or a new pipe is opened,

it uses a new descriptor.

There's a limit to how many descriptors you can have open in a single
job. To me, it sounds like you are exceeding that limit. Perhaps
somewhere in your process, you are opening a stream file and forgetting
to close it? Thus it's staying open, and HTTPAPI is running out of
descriptors?

That's what the error sounds like, to me. HTTPAPI can only handle
descriptor numbers up to number 223. IF you have more open than that,
it will produce the error you describe.

In my experience, programs under OS/400 don't normally have that many
descriptors open at the same time. If for some reason they do, it's a
sure sign that a developer is accidentally leaving files open, and is
running out of descriptors...

-SK


Peter Connell wrote:
Hi,

We are now getting intermittent exceptions occurring during HTTPAPIR4
execution on our production HTTP server.

Strangely, this is occurring during the connection for one particular
service, others appear OK.

Yet we have not made any changes to the service itself and certainly
not
changed the HTTPAPIR4 interface which is robust.



What has changed is the application layer from which the service is
invoked.

A significant change is that layer now includes xml parsing via a
java
transformation class invoked from RPGLE.



I'm at a loss to understand what is happening and wondering if it is
possible that there is some corruption of memory or file descriptor
occurring outside of the control of the HTTPAPIR4 interface as I trust
that there is no inherent error within that.



I do employ the recommended "java frame" approach to managing java
objects by beginning and ending an object group.

I also recall seeing some similar "Klement" code that also made
reference to the need to open 3 file descriptors during the JVM
instantiation.

I don't remember the need for this but perhaps it may be relevant to
the
error arising elsewhere in the HTTPAPIR4 interface.



I have thought that maybe running HTTPAPIR4 in it's own activation
group
help.



The HTTPAPIR4 exception is below.





SEV DATE TIME FROM PGM LIBRARY INST TO
PGM
LIBRARY INST

50 11/08/09 09:06:44.171496 QRNXIE QSYS *STMT
HTTPAPIR4 LIBHTTP *STMT

From user . . . . . . . . . : QTMHHTP1


From module . . . . . . . . : QRNXMSG


From procedure . . . . . . : SignalException


Statement . . . . . . . . . : 20


To module . . . . . . . . . : COMMTCPR4


To procedure . . . . . . . : COMMTCP_FD_SET


Statement . . . . . . . . . : 4659


Message . . . . : Length or start position is out of range for the
string

operation.


Cause . . . . . : One of the following has occurred in RPG
procedure


COMMTCP_FD in program LIBHTTP/HTTPAPIR4: - A numeric length or
start


position is less than 1 or too large for the string operation. -
The


search-argument parameter of the %SCAN built-in function has zero
length or

is longer than the source-string parameter. - The maximum-length
parameter

of the %STR built-in function is not a value between 1 and the
maximum size

of a character field. Recovery . . . : Contact the person
responsible for

program maintenance to determine the cause of the problem.



Visit our website www.vedaadvantage.com. It has a new design with
improved navigation and search capabilities; and customer friendly
interface with more relevant insights and solutions to help you make
informed decisions.


########################################################################
#############

This correspondence is for the named person's use only. It may contain
confidential
or legally privileged information, or both. No confidentiality or
privilege is waived
or lost by any mistransmission. If you receive this correspondence in
error, please
immediately delete it from your system and notify the sender. You must
not disclose,
copy or rely on any part of this correspondence if you are not the
intended recipient.
Any views expressed in this message are those of the individual
sender, except where
the sender expressly, and with authority, states them to be the views
of Veda Advantage.
If you need assistance, please contact Veda Advantage on either :-
Australia 1300-921-621 or New Zealand +64 9 367 6200


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.