Comments (10)
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.
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
from capistrano-resque.
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.
@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.
Thanks for the tip!
from capistrano-resque.
@chagel Any gists or examples of your setup with resque-pool+god+capistrano3?
from capistrano-resque.
@joshuairl Sorry for late reply. I just made a post here.
from capistrano-resque.
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.
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.
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)
- incompatibility between capistrano-resque and capistrano-rbenv HOT 13
- Having issues deploying
- Sometimes resque:scheduler:restart doesnt kill active process, instead it spawns new one HOT 1
- Not Working correctly with Resque 1.26 HOT 6
- failed to create symbolic link HOT 1
- Bump version for resque_extra_env HOT 3
- Unable to start resque, there is no log file created.
- Example usage with capistrano v3.1? HOT 10
- Verify that the ./tmp/pids folder exists HOT 2
- Cap 3 version requires sudo to resque:stop (or restart) HOT 2
- resque:start hangs HOT 8
- Running the start/restart script doesn't end the capistrano task HOT 3
- INFO -- : Failed to start worker : #<Errno::EIO: Input/output error - <STDERR>> HOT 4
- Expand README HOT 1
- resque:* produces no output HOT 16
- Multiple Log Files for Resque HOT 1
- Lost workers HOT 4
- Gem requires rake task HOT 4
- cap production resque:restart failing, with nothing written to stdout HOT 9
- VERBOSE=1 should be an option HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-resque.