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



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 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
Programmer/Analyst

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



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.