Comments (3)
Hi @SimantovYousoufov, yup, I have seen this too. There can be a fair bit of overhead creating new connections, etc. on every fork. To get around this we started using resque-multi-job-forks which lets us not have to fork for every job. Once enabled, we saw a massive performance increase with the job execution time and also a noticeable load decrease on our db.
Have you tried using that plugin?
from resque.
Yeah Rails does automatically reconnect after forking now. I don't think Resque can actually do anything to solve this other than forking less often. You can potentially try to configure Rails to not do this, but I'm not sure if that's an out of the box configuration option or if that's something you need to roll yourself. Ideally you'd only do that on resque jobs and not with your web server.
from resque.
Ya, and for good reason. There can a lot of oddness with trying to re-use connections across new forks.
Agreed with @PatrickTulskie, not sure there's much you can really do other than either not fork, or if you still want some of the benefits of forking, use the plugin I mentioned above.
from resque.
Related Issues (20)
- Unsupported command argument type: TrueClass. Migration from redis gem v4 to v5 HOT 5
- Web Interface failing with Internal Server Error
- Blocking background worker process over SSH HOT 2
- Make the signal for child termination configurable HOT 1
- Workers not terminating as expected HOT 1
- resque-status is not compatible with Resque > 2 HOT 2
- deadlock during deallocation of threads and fork
- [feature request] filter sensitive args in resque server
- DirtyExit VS PruneDeadWorkerDirtyExit - what is the difference? HOT 1
- USR2 signal is happening but my resque job is going to dirty exit HOT 2
- start_heartbeat can die while worker is still running HOT 1
- Unpatched CVE-2022-44303 - Reflected XSS HOT 4
- Please publish security advisories for XSS vulnerabilities HOT 4
- Search Feature in failed jobs HOT 2
- Cannot use with Rack 3.0 because of Sinatra (resque-web); Blocked upgrade to Rails 7.1 HOT 6
- Ruby 3.3 and stuck workers. HOT 22
- Autoscaling resque question HOT 2
- Overview UI Broken Due to Nonce Whitelist HOT 2
- Code & comment for redis initializer method could be clearer
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 resque.