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



Jon, Jim, and Henrik,
Thanks for the replies here. (If you're following the thread on Midrange-L, you may have seen my thanks to you there as well).
I'll be looking into adding a web service call to the start-up stack and see how much I get from that.
-- Michael

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Monday, March 09, 2015 11:29 AM
To: Web400@Midrange. Web400
Subject: Re: [WEB400] Web Service slow on first call of the day

IWS is a Java App server so the overhead comes from starting up the JVM
itself and then the app server and then your app.

It is not going to be speedy - but yours does seem a little excessive.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Mar 9, 2015, at 9:20 AM, Koester, Michael <mkoester@xxxxxxxxxxxxx>
wrote:

Thanks for that, Charles.
Is it likely that the Web Service is the choke-point, or something else?
My thinking is that it may not be necessary to take down the web server if
that might be a solution. I'd need to check with SysAdmin and others, but
worth pursuing if that is "the beast".
-- Michael
~~~~~~~~~~
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of
Charles Wilt
Sent: Monday, March 09, 2015 9:06 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Web Service slow on first call of the day

The first call is always going to be slower, that's just the nature
of the beast.

30+45 seems excessive, but I suppose it depends on what's happening
30+behind
the scenes.

You've got a couple options
1) Stop taking down everything every night
2) In your start up, include a program that makes a priming call to
the web service.

Charles

On Mon, Mar 9, 2015 at 8:58 AM, Koester, Michael
<mkoester@xxxxxxxxxxxxx>
wrote:

(cross-posting to MIDRANGE-L)
I have developed a web service with the Integrated Web Services
facility
(IWS) that is almost production ready, but I'm noticing that the
very first call of the day takes 30-45 seconds to return a response.
A subsequent calls provide sub-second responses, and that continues
throughout the day.
I'm normally pretty patient, but this will be used to provide data
to a customer-facing web site, and if I was the first customer of
the day to the web site, I'd give up if it hung for more than 10
seconds -- by
30 seconds I'd be off doing other things for sure.

My questions are:
1. What are the likely causes for the delay-on-first-call behavior?
2. What might I do to either eliminate the problem, or perhaps
simulate a call on web server start-up, so that the first customer
gets an acceptable response time?

In our environment, we take down most subsystems overnight, for
database back-ups, for about 2 hours. When that completes, a n
orderly CL-driven start-up occurs, and the various subsystems are
restarted and are ready for action by about 4:30 AM. The web
services are automatically active as the web server comes up.

The web service itself calls an ILE-RPG program that calls a number
of service program procedures to gather data elements needed for the
web site presentation and navigation. Most of those procedures use
embedded static SQL. In my testing, I use the SOAPUI utility to
simulate the calls that the web site script would use, and it is
with the SOAPUI calls that I observe the delay in response on that
first
call.
My guess is that at least one component along the way takes a long
time to set up open data paths or something else that all the
subsequent calls get a free ride on, but I don't know enough about
what goes on behind the IWS curtain to know if there isn't an
obstacle
there.

All ideas are welcome. Let me know what other details might be
helpful.
Thanks!

Michael Koester


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.