Comments (8)
Update - So delayed_job calls Daemons.run_proc from within an environment that already has Rails loaded and Rails doesn't seem to like having all its IO closed out from underneath it.
Perhaps a cmd line option is in order to disable the close_io call within simulate? Or running without simulate at all?
from daemons.
Can you try to replace [$stdin, $stdout, $stderr]
by [STDIN, STDOUT, STDERR]
? There was a change in the last release that might have had undesired side effects.
from daemons.
I tried changing it to this:
ObjectSpace.each_object(IO) do |io|
unless [STDIN, STDOUT, STDERR].include?(io)
print "Attempting "
pp io
io.close rescue nil
else
puts "Skipping #{io}"
end
end
And the output is:
jack:import_tester sblackstone$ ./bin/delayed_job run
Skipping #<IO:0x007fae328a2b08>
Skipping #<IO:0x007fae328a2ba8>
Skipping #<IO:0x007fae328a2c48>
Attempting #<File:/Users/sblackstone/code/import_tester/log/development.log>
Attempting #<File:/Users/sblackstone/.rvm/gems/ruby-2.3.1/gems/delayed_job-4.1.2/lib/delayed/command.rb (closed)>
Attempting #<IO:fd 20>
with lsof showing:
ruby 28355 sblackstone 20 PIPE 0x2e2061ee1d21f023 16384 ->0x2e2061ee3d31bc23
from daemons.
So is it still hanging? (in the original order of the calls)
from daemons.
Yep - its hanging at the last line in that output... Calling close on that fd..
from daemons.
Then I rather don't think it is a daemons issue. Can you open a bug report for delayed_job
?
from daemons.
will do - thanks.
from daemons.
Cross posting this from the delayed_job ticket:
Alright, so it only occurs when rails is running in development mode. If you run bin/delayed_job run
with daemons, it will hang..
But then if you killall -9 fsevent_watch (part of Rails dev mode) - it will then get past the hung IO.close and enter in into the normal run loop and start processing jobs..
from daemons.
Related Issues (20)
- Failure to install development dependency pry-byebug with '~> 0' version constrain HOT 4
- Stopping daemon log file error? HOT 4
- apps inherit app_name even when new name is specified HOT 1
- Windows: fork() function is unimplemented on this machine (NotImplementedError) HOT 5
- Specify number of processes HOT 3
- Where is the documentation? HOT 1
- run many workers HOT 2
- Run n Instances of a script parallelly in background and kill all of them when needed.
- Run script files in background (as daemons) HOT 2
- Turns out delayed_job was executing a job causing a segmentation fault, which would kill the delayed_job daemon. HOT 1
- Why parent process does not care about child
- Detatch doesn't consider external logging
- Question: Semantic Versioning HOT 2
- Make working directory compatible with macOS Catalina
- `daemons` always exits with zero
- Problematic behavior when handling TERM Signal
- NoMethodError: undefined method `positive?' for 20:Fixnum
- Zombie/Defunct process when monitoring using pidfiles
- call_as_daemon method don't stop child process 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 daemons.