Discussion:
How can I stop my program going to sleep?
Martin Sondergaard
2014-09-24 18:43:41 UTC
Permalink
I have written a Prolog program that generates HTML pages,
and sends them out to the web.
This uses the Prolog server, "http_server".

Unfortunately if nobody uses the website for a few hours,
or a few days, the Prolog program will seem to fall asleep.
I mean it becomes very slow to respond, to the first input.
Then after it has responded once, it works fast again, its back to
normal speed.

Is there a way to stop the program slowing down?

I wonder if this is caused by the program being automatically
shifted out of RAM, into swap space.

I am using Fedora Linux, so if there is no Prolog command
to solve this problem, perhaps it can be done using a Linux command.

--
Martin Sondergaard,
London, U.K.
Paul Singleton
2014-09-25 09:35:10 UTC
Permalink
Post by Martin Sondergaard
...
Unfortunately if nobody uses the website for a few hours,
or a few days, the Prolog program will seem to fall asleep.
If your site is Internet-visible, sign up to a monitoring service;
several have a basic free option. This will send a test request every
few minutes.

Paul Singleton

Loading...