Giter Club home page Giter Club logo

Comments (10)

9z0b3t1c avatar 9z0b3t1c commented on August 16, 2024

capistrano-resque only figures out what commands to run on the remote server. Do your resque workers run correctly when started manually on the remote servers? Are the commands you use to start them manually exactly the same as the ones capistrano-resque outputs?

from capistrano-resque.

chagel avatar chagel commented on August 16, 2024

Happen to see this behaviour again.
Output from part of my capistrano result:

  * 2013-05-08 21:05:57 executing `resque:restart'
  * 2013-05-08 21:05:57 executing `resque:stop'
  * executing "if [ -e /home/webuser/www/xxx/current/tmp/pids/resque_work_1.pid ]; then            for f in `ls /home/webuser/www/xxx/current/tmp/pids/resque_work*.pid`;              do  kill -s QUIT `cat $f`              && rm $f ;done            ;fi"
    servers: ["api.xxx.com"]
    [api.xxx.com] executing command
    command finished in 1845ms
  * 2013-05-08 21:05:59 executing `resque:start'
 ** Starting 1 worker(s) with QUEUE: auth
  * executing "cd /home/webuser/www/xxx/current && RAILS_ENV=staging QUEUE=\"auth\"            PIDFILE=./tmp/pids/resque_work_1.pid BACKGROUND=yes VERBOSE=1 INTERVAL=5            bundle exec rake resque:work"
    servers: ["api.xxx.com"]
    [api.xxx.com] executing command
    command finished in 15525ms
 ** Starting 1 worker(s) with QUEUE: apn
  * executing "cd /home/webuser/www/xxx/current && RAILS_ENV=staging QUEUE=\"apn\"            PIDFILE=./tmp/pids/resque_work_2.pid BACKGROUND=yes VERBOSE=1 INTERVAL=5            bundle exec rake resque:work"
    servers: ["api.xxx.com"]
    [api.xxx.com] executing command
    command finished in 15179ms

➜  xxx git:(master) cap staging resque:status
    triggering load callbacks
  * 2013-05-08 21:08:10 executing `staging'
    triggering start callbacks for `resque:status'
  * 2013-05-08 21:08:10 executing `multistage:ensure'
  * 2013-05-08 21:08:10 executing `resque:status'
  * executing "if [ -e /home/webuser/www/xxx/current/tmp/pids/resque_work_1.pid ]; then             for f in $(ls /home/webuser/www/xxx/current/tmp/pids/resque_work*.pid);               do ps -p $(cat $f) | sed -n 2p ; done            ;fi"
    servers: ["api.xxx.com"]
    [api.xxx.com] executing command
 ** [out :: api.xxx.com] 9575 ?        00:00:00 ruby
    command finished in 2023ms

Directory list on server:

[webuser@staging pids]$ ll
total 8
-rw-rw-r-- 1 webuser webuser 4 May  8 13:06 resque_work_1.pid
-rw-rw-r-- 1 webuser webuser 4 May  8 13:06 resque_work_2.pid
[webuser@staging pids]$ ps aux| grep resque
webuser   9575  0.0  2.5 383280 97160 ?        Sl   13:06   0:00 resque-1.23.0: Waiting for auth
webuser   9948  0.0  0.0 10342

@sshingler

from capistrano-resque.

ptrf avatar ptrf commented on August 16, 2024

I have a similar setup (4 workers, 2 servers), and I see the same behavior as well (resque:restart, 4 workers started up, 3 workers restarted, one perished)

The PID-files are there, just like in @chagel's case, so something definitely happens, but after around 15 seconds, one or more workers are missing.

from capistrano-resque.

chagel avatar chagel commented on August 16, 2024

@ptrf Sad to see you have the same problem. I've been using resque-pool+god since then and it works for me.

from capistrano-resque.

ptrf avatar ptrf commented on August 16, 2024

Thanks for the tip!

from capistrano-resque.

jfrux avatar jfrux commented on August 16, 2024

@chagel Any gists or examples of your setup with resque-pool+god+capistrano3?

from capistrano-resque.

chagel avatar chagel commented on August 16, 2024

@joshuairl Sorry for late reply. I just made a post here.

from capistrano-resque.

tomgong avatar tomgong commented on August 16, 2024

Any news about this?
I have the same issue (1 server, 6 workers). Not all workers get started on resque:start/restart. No log output.

When i execute the commands from capistrano log output on the remote server manually everything works well.

from capistrano-resque.

dmarkow avatar dmarkow commented on August 16, 2024

I haven't personally experienced this, but I'm thinking it has something to do with some issues in how Resque 1.25.x forks (which was incompatible with this gem). We already fixed it a couple months ago, but haven't released a new gem yet.

If you use master instead of the 0.1.0 gem, do you still see the same issues?

from capistrano-resque.

dmarkow avatar dmarkow commented on August 16, 2024

I just pushed a new version (0.2.1), which better handles the Resque 1.25.x forking issues.

If you still have failing workers, set resque_log_file to something like "log/resque.log" (it defaults to /dev/null), try to start some workers, then report back with the contents of the log file. Closing this for now, but reopen it if you still have any issues.

from capistrano-resque.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.