2009-03-13 16 views

Respuesta

2

Tome un vistazo a este GIST resuelve el problema: https://gist.github.com/matthuhiggins/668744

+0

Gracias por el último, pero buen consejo! – MikeN

+0

El enlace parece conducir a un correo no deseado. – Jirapong

+0

Quizás el blog haya terminado. Lo conseguiré en webarchive y lo publicaré en gist o algo similar. –

1

No sé capistrano, pero ¿no puede simplemente matar el proceso de memcached y generar uno nuevo? Mejor probablemente para eliminar la fragmentación también.

+0

Capistrano es herramienta de automatización de la implementación, por lo que el reinicio haría también hacerse por capistrano. – vartec

4
+0

Descubrí que no podía iniciar la memcached con la receta de Capistrano con la que establecía el vínculo. Entonces encontré esto: http://www.ruby-forum.com/topic/83485. Eso funcionó para mí. – mj1531

0

Esto, por Susan Potter se ve muy bien https://gist.github.com/rays/154570

# 2007 Copyright Susan Potter <me at susanpotter dot net> 
# You can read her software development rants at: http://geek.susanpotter.net 
# Released under CreativeCommons-attribution-noncommercial-sharealike license: 
# http://creativecommons.org/licenses/by-nc-sa/1.0/ 
namespace :memcached do 
    desc "Restart the Memcache daemon" 
    task :restart, :roles => :app do 
    deploy.memcached.stop 
    deploy.memcached.start 
    end 

    desc "Start the Memcache daemon" 
    task :start, :roles => :app do 
    invoke_command "memcached -P #{current_path}/log/memcached.pid -d", :via => run_method 
    end 

    desc "Stop the Memcache daemon" 
    task :stop, :roles => :app do 
    pid_file = "#{current_path}/log/memcached.pid" 
    invoke_command("killall -9 memcached", :via => run_method) if File.exist?(pid_file) 
    end 
end