By topic444
I’m noticing that the first request of the day to a personal app I’m developing on a 1GB droplet is taking an extraordinarily long time to complete. The prior night everything is fine, but it’s the initial request the following morning. (I am not shutting down the instance at night.)
Does a droplet somehow “sleep” when inactive? This is for a standard Rails/Postgres stack fronted by Nginx.
The behavior reminds me of Heroku or AWS Lambda, but I wouldn’t expect that from a VPS.
Is there something I should be looking for or checking? I can’t imagine what would cause that to happen. I’m not having any network issues or similar. The initial request completes, but only after a very long time, then everything is back to normal again.
I could add something to ping regularly, but I wouldn’t expect that to be necessary.
Any ideas? Thanks.
Edit: I also noticed this post, which appears to be the same stack and issue (without resolution): https://www.digitalocean.com/community/questions/initial-request-to-droplet-extremely-slow-after-longer-periods-of-inactivity
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Another thought is, could this be related to memory swap/churn, after idling overnight? (Other than the usual incoming probes for PHP vulnerabilities, etc.)
I’m pretty sure this is not related in this situation.
Should a 1GB droplet be enough to power a Rails app (simple test app) plus Postgres?
Of course.
I have noticed the same behavior on my 1GB droplet since the beginning of 2018.
I think DigitalOcean used to work as a real VPS without any “wake up” timeouts before that. Now it reminds me Heroku model, unfortunately.
Another thought is, could this be related to memory swap/churn, after idling overnight? (Other than the usual incoming probes for PHP vulnerabilities, etc.)
Should a 1GB droplet be enough to power a Rails app (simple test app) plus Postgres?
top shows puma taking about 8.5% memory, postgres much less. (Though Puma is using about 10x that amount of virtual memory.)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.