× 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.



Charlie,

Thanks for your reply. I was out of town over the weekend.

The spawned jobs that actually process the accepted socket automatically
(manually) close the socket and end after 20 seconds. The 100, as I
understand it, is how connections can be queued up prior to the incoming
socket is accepted, not the number of active accepted connections. Since
the process spawns off a new job to accept the connection for each incoming
request, 100 should be overkill as only 1 or 2 would be in the queue waiting
to be accepted. The network traces never show a connection refused status.

The number of jobs allowed in the subsystem is *Nomax.

During the "bad" periods when there are issues, there are 6 to 8 connection
requests being processed second. Normally there are a connection request
per second.

Today I noticed (via NetStat *CNN) there were established connections that
did not have a job associated with it. They sat there for at least 10
seconds before they finally were accepted by the listener and then passed
off to a spawned job. My understanding is that the network card negotiated
the connection but has yet to notify the listener program. At that time
there were 72 "active" connections on that port.

Thanks again for your help.

Rich M.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Charles Brewster
Sent: Friday, August 02, 2013 10:56 AM
To: 'RPG programming on the IBM i (AS/400 and iSeries)'
Subject: RE: Socket Listener Delay Issue

Rich,

I assume you are using RPG and the Socket API's.

Are you closing the socket descriptors when you are done with them?

Your program might be choking because it has reached the maximum number of
simultaneous open sockets it can address at once, until some expire (they
will auto close after 2 minutes of inactivity,) it cannot do anything.

The maximum simultaneous open sockets the system API's can handle did seem
pretty low to me. You really need to close them yourself.

What is the volume of connections you receive in a 2 minute window?

Charlie


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Rich Marion
Sent: Friday, August 02, 2013 12:40 AM
To: 'RPG programming on the IBM i (AS/400 and iSeries)'
Subject: Socket Listener Delay Issue

I have encountered a little intermittent problem with a program that is
monitoring a port for any incoming connections. It appears that it does
not get notified in a timely manner, sometimes, when there is a connection
request.

I set up a listen socket descriptor, then bind to the port, then set listen
with a parm of 100.

I have it log to a file the timestamp when a connection is received. I
accept the connection to an accept socket descriptor, and then spawn off
another job passing the accepted descriptor to the new job. Each incoming
request has its own spawned job to handle the communications. The
subsystem and jobqs are set to *NoMax.

My listener program logs every step to a log file with the time stamp it
happens.

Periodically, a network trace of the traffic will show the communications
between the remote device and the 400 NIC, but the program will not know of
its existence until after a delay. Most of the time it processes the
request within a few micro seconds from when the remote device initiates the
connection. But every so often, the 400 NIC will not inform my listener
program of the incoming transmission for up to 15 seconds.

I know for a fact the delay is between the 400 NIC and my listener program.
Network traces and my log files have proved this beyond any doubt. During
that delay, my listener program does accept and process other requests. It
has plenty of "Spare" time to handle the delayed request.

When it decides to have a delay, it affects multiple incoming requests.
(Each request is from a separate device.) We are at V7. Can anyone point me
in a direction to go or to a forum?

Thanks
Rich M.


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3209/6545 - Release Date: 08/02/13



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.