I run a cloud run instance of Ghost, and managed to get the sql database running smoothly.
The only problem that remains is the long bootup time, when the “we’ll be right back” message is displayed. I feel like this sequence is artificially long assuming the database is connected already.
Is there any way to “skip” this startup sequence or should I find another cloud provider?
What times are we talking about for the boot time you are seeing? Why is the instance restarted so often this becomes problematic?
Boot sequence optimization is something the team is constantly working on and had good gains recently. It should not be too noticeable/problematic for the end user as long as your CDN is configured.
Usually in the range of 30-60 seconds, it reboots on first request, and then stays up for a bit before shutting down (see westmichigancopts.org). It’s almost there in terms of being feasible enough to run in that environment, but it could be that there is not enough cpu power or ram.
Edit: I will look into setting up cloudflare and see if that helps.
Update: I configured cloudflare, and after integrating the new google drive plugin, I’ve observed my site serving content despite the “origin” server being down or retuning 503’s when starting.
Hey, did you get to a state where you were happy with Ghost running in CloudRun? I’m at a similar point to you I think: It’s all running nicely but of course CloudRun shuts the instance down when inactive (good for costs), but the 20-30 second startup time means new requests get “we’ll be right back” for quite a while.
I could use Google CDN with “serve while stale” I suppose, but hoping there’s a cleaner solution?
Other people have reported that Google Cloud Run is noticeable slower.
This seems like an environment issue, not a Ghost issue.
Ghost runs comfortably on a $10/month Linode plan, but based on the resource use I see, it could also run on Linode’s $5/month plan.
On the $10/month plan with 2 GB of memory, I’m able to run 2 Ghost installs, a Wordpress Install and a Matomo install and I’m still only using about half the memory.
I’d ditch Google Cloud Run.
Good advice, thanks. Yes I think CloudRun’s CPU allocation takes some of the blame - it allocates CPU during the request, but if that request is just Ghost’s “503 I’m not ready yet” then the container is very hobbled trying to start up.
I really prefer serverless/ephemeral approaches but looks like Ghost isn’t well suited to this at the moment.
I run four VPS from three providers - all perform well, I recommend OVH for Europe and Antipodes.
time ghost stop is 1.5 seconds cold
time ghost start is 8 seconds cold
- browser refresh only seems to show holding page for about 3 seconds.
These are low spec SSD VPS, with just 4G RAM and 1CPU 4800 bogomips - so I’m chuffed with Ghost performance. MySQL is more of a hog (though still pretty light compared so other dbs).