Link to home
Start Free TrialLog in
Avatar of FrankG77
FrankG77

asked on

How do I prevent my web service from calling asleep?

My issue is that every web service that I create eventually falls asleep. To be more specific, if I deploy a web service on a windows server, it works fine whenever I call it. However, if the web service doesn't get called for around 12 hours, the next time it's called it takes significantly longer on the first web service call. Afterwards, if I call it again within the 12 hour or so window, it works fine.

I've heard that if you set "Generate serialization assembly" to "on" before you publish the web service, it's supposed to fix this problem. However, the result is still the exact same even with it set to "on."
Avatar of Arana (G.P.)
Arana (G.P.)

Have you checked the Start Mode: AlwaysRunning option in your pool settings? (Available since IIS 8)
if no IIS8 then you have to create a task to ping regularly or increase the idle time-out, but it will only last longer, it will still happen if you just increase the idle timeout.
Avatar of FrankG77

ASKER

I switched it to "always running." I'll call the web service tomorrow and let you know if the problem is resolved. Thank you.
remember you must restart the pool, for it to take the setting
Yes, after I switched it to "always running" I restarted the pool. I called the web service this morning, and it timed out. I called it again, and it's responding immediately now. There appears to be no change.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.