Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi,
I have a small VPS running my Rails app which is a personal website. I use SearchKick and that in turn uses ElasticSearch.
I find that ElasticSearch appears to fall over. I notice it mainly after a deploy. I had a similar issue with Delayed Job and was told I could set up a Capistrano task to restart that after each deploy. Code for that is below. That works fine but I don’t think I can do the same for ElasticSearch (I have tried and it didn’t work).
Anyone have any ideas as to how I can ensure ES is running properly after a deploy?
The code to restart Delayed Job is:
namespace :delayed_job do
def args
fetch(:delayed_job_args, "")
end
def delayed_job_roles
fetch(:delayed_job_server_role, :app)
end
desc 'Stop the delayed_job process'
task :stop do
on roles(delayed_job_roles) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :bundle, :exec, :'bin/delayed_job', :stop
end
end
end
end
desc 'Start the delayed_job process'
task :start do
on roles(delayed_job_roles) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :bundle, :exec, :'bin/delayed_job', args, :start
end
end
end
end
desc 'Restart the delayed_job process'
task :restart do
on roles(delayed_job_roles) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :bundle, :exec, :'bin/delayed_job', args, :restart
end
end
end
end
end
2583ba6f992544f1b72fc7dae1fea2
TheMaty
SandyDarkBlueRay
Zaid Osman
tech kovo
aliasgar
Gibran Vargas
243261243130245072634378515368
243261243130245072634378515368
243261243130245072634378515368
77b82faf157692c64264c1bbf14924
sabil05