I'm running this Rails app on a DigitalOcean FreeBSD droplet. Lately I've been experiencing extremely slow initial requests after longer periods of inactivity. Subsequent requests are fine.
At first I thought it was my PostgreSQL database or the Rails app itself, but now I see SSH connections made simultaneously with those initial requests are equally slow.
if you run the daemon in any environment that is resource starved and
the process(es) gets swapped than anything will be slow on first request
after period of inactivity. Not just NSD and not just any DNS server,
but anything...
if you run the daemon in any environment that is resource starved
and the process(es) gets swapped than anything will be slow on first
request after period of inactivity. Not just NSD and not just any DNS
server, but anything...
I don't know, someone on the FreeBSD mailinglist suggested it might be a badly configured DNS, although my syntax seems fine and my reverse has been set up properly from my ISPs side.
The thing is that there should be plenty of resources available at all times. I've even gone to the extra length of CPU limiting resource hungry processes just incase.
I read somewhere that some people use a cron script to send a request to the webserver every so often. Is this something that everybody does but that I've somehow missed? Does it have a name?