PDA

View Full Version : Keeping a Web Service awake



Archie Campbell
22-Mar-2005, 06:55 PM
I currently have a Web Service running under process pooling.
It is set to automatically reload every 2 hours.
It uses a P.SQL version 8 database.

The Web Service runs very quickly (immediate response, no delay, its fast)
except every once in a while it seems to need to be woken up. It takes like
40 seconds to respond. Subsequent responses are quick.
The problem is that the program calling the WebService is timing out and
displaying a nasty message.
Yes, they could increase their calling timeout, but .....

Does this "falling asleep" make any sense?
Is there a way to keep it awake.

Thanks
Archie Campbell

Anders Öhrt
23-Mar-2005, 02:59 AM
> The Web Service runs very quickly (immediate response, no delay, its fast)
> except every once in a while it seems to need to be woken up. It takes
> like
> 40 seconds to respond. Subsequent responses are quick.

Is there nothing in the logs?

40 seconds sounds like a network timeout to me, assuming your WS doesn't do
things like loop big amounts of data that aren't in the DB-cache.

// Anders

Archie Campbell
23-Mar-2005, 10:55 AM
Hello Anders
1. Correct, I have not noted anything in the logs.

2. The WS accesses small amounts of data, typically one record in a table
the the 4 related parent records.

Archie

"Anders Öhrt" <Anders.Ohrt@capslock.se> wrote in message
news:25osk43LFHA.5816@dacmail.dataaccess.com...
>
> > The Web Service runs very quickly (immediate response, no delay, its
fast)
> > except every once in a while it seems to need to be woken up. It takes
> > like
> > 40 seconds to respond. Subsequent responses are quick.
>
> Is there nothing in the logs?
>
> 40 seconds sounds like a network timeout to me, assuming your WS doesn't
do
> things like loop big amounts of data that aren't in the DB-cache.
>
> // Anders
>
>

Oliver T. Nelson
23-Mar-2005, 11:50 AM
Hmm,

I would look for client/server connection timeouts. IOW, the CK is having to
reauthenticate and connect to the database server. This could cause a delay
like this.

OLIVER

Archie Campbell wrote:
> I currently have a Web Service running under process pooling.
> It is set to automatically reload every 2 hours.
> It uses a P.SQL version 8 database.
>
> The Web Service runs very quickly (immediate response, no delay, its fast)
> except every once in a while it seems to need to be woken up. It takes like
> 40 seconds to respond. Subsequent responses are quick.
> The problem is that the program calling the WebService is timing out and
> displaying a nasty message.
> Yes, they could increase their calling timeout, but .....
>
> Does this "falling asleep" make any sense?
> Is there a way to keep it awake.
>
> Thanks
> Archie Campbell
>
>
>
>
>
>
>

Anders Öhrt
24-Mar-2005, 03:21 AM
Check if you have enabled Auto Reconnect in PCC.

If it's a possibility, you could try running with local data for a while and
see if that eliminates the problem. If so, it's a network or C/S
configuration problem.

// Anders

Archie Campbell
24-Mar-2005, 03:25 PM
"Anders Öhrt" <Anders.Ohrt@capslock.se> wrote in message
news:J3IvjqEMFHA.7560@dacmail.dataaccess.com...
>
> Check if you have enabled Auto Reconnect in PCC.
It was OFF.
I turned it ON.
I dont think that is it however.
It helps when there has been a network outage. It will not error out.
Instead it will reconnect.

>
> If it's a possibility, you could try running with local data for a while
and
> see if that eliminates the problem. If so, it's a network or C/S
> configuration problem.
I will look at all the Pervasive Client settings.
Thanks Anders.


>
> // Anders
>
>

Archie Campbell
24-Mar-2005, 03:42 PM
Good idea, Oliver. I will check the Pervasive Control Center ->
Configuration -> Client settings

1. Connection timeout is set at 15 seconds.
I think that means that after 15 seconds it will give up and error out.
I left it at is.

2. Supported Protocals
Its set to three of them:
Microsoft SPXII, TCP/IP and NETBIOS
Maybe I should simplify it and just use TCP/IP


3. Cache Engine - Back to Minimal State if Inactive
Advanced: Causes the Microkernel to free all memory and thread resources to
the system and return to a minimal state (no resources allocated) when there
are no active clients.
Was set to ON
I changed it to OFF

4. Cache Engine - Minimal State Delay
Advanced: How long the MicroKernel will wait (in seconds) before going into
minimal state
Was set to 300 (5 minutes)
I changed it to 30000 (8+ hours)
(probably with no effect cuz I turned it OFF above, but )

Could be that 3 and 4 were my problem.
We will see.

Thanks for the help

ARCHIE




"Oliver T. Nelson" <oliver@ootbc.com> wrote in message
news:IpAdGi8LFHA.7472@dacmail.dataaccess.com...
> Hmm,
>
> I would look for client/server connection timeouts. IOW, the CK is having
to
> reauthenticate and connect to the database server. This could cause a
delay
> like this.
>
> OLIVER
>
> Archie Campbell wrote:
> > I currently have a Web Service running under process pooling.
> > It is set to automatically reload every 2 hours.
> > It uses a P.SQL version 8 database.
> >
> > The Web Service runs very quickly (immediate response, no delay, its
fast)
> > except every once in a while it seems to need to be woken up. It takes
like
> > 40 seconds to respond. Subsequent responses are quick.
> > The problem is that the program calling the WebService is timing out and
> > displaying a nasty message.
> > Yes, they could increase their calling timeout, but .....
> >
> > Does this "falling asleep" make any sense?
> > Is there a way to keep it awake.
> >
> > Thanks
> > Archie Campbell
> >
> >
> >
> >
> >
> >
> >

Anders Öhrt
26-Mar-2005, 05:12 AM
>> Check if you have enabled Auto Reconnect in PCC.
> It was OFF.
> I turned it ON.
> I dont think that is it however.
> It helps when there has been a network outage. It will not error out.
> Instead it will reconnect.

I know, I was thinking that if you had this ON, that might have been what
happended. Connection lost, 40 sec timeout and auto-reconnect.

I had a customer with a really unstable net which lost connection often, but
they only had a WebApp, no WS, and they don't use PP, so easy connection
break required restarting the service.

// Anders