Comments (7)
SIGTERM means that another process on the system sent a SIGTERM to your process that forced your process to crash with a stack trace of whatever it happened to be doing when it received the SIGTERM. So this is not a code problem with redis-rb, you need to look elsewhere on your system to see who is sending you the SIGTERM's and make it stop.
from redis-rb.
Wow you are super responsive! Thanks for the quick reply.
I understand what you're saying -- but my question is: which process actually received the SIGTERM? The rails server? Or the Redis server? Or something else? And do you have an idea how we could go about determining who is sending the SIGTERM? We were unable to reproduce this problem in our staging environment... this happened when we pushed to production. We were forced to roll back within a few hours.
Unfortunately I was out while this effort was going on, but I think they had setup 3 Redis servers behind a load balancer. I personally think that this added complexity was the cause of the problems... I'm not sure if the load balancer was configured for round-robin or failover, but at any rate, I'm guessing that that was the issue.
from redis-rb.
Yeah redis doesn't really work behind a load balancer out of the box, it kind of relies on being its own atomic server, you can do replication but it requires you to write to master and read from slave, no simple round robin.
It looks to me like your ruby process or rails process(whichever process produced that log message) got a SIGTERM sent to it right in the middle of reading a reply from redis. Do you have any watchdog daemons on your system that will try to kill things that use too much cpu or memory? Any monitoring tools that would cause this? Nothign in redis or redis-rb ever sends a SIGTERM so it has to be something else in the operating system doing it. Are you trying to run the rails processes under monit perhaps?
from redis-rb.
It's a rails process, running under Passenger. I have a question out to ops about whether or not we have a watchdog daemon or monitoring tool. But also... if the Redis servers weren't setup properly for replication, maybe the request to Redis timed out, and the SIGTERM was from Passenger itself, after reaching some timeout on the HTTP request (?).
Anyway thanks for the responses. I'll let you know if we make any progress with this.
from redis-rb.
OK so the SIGTERM exceptions were a bit of a red herring I think. They only occurred during deployments. But we did notice a slowdown after deploying our app that had vanity implemented; our Nagios monitoring started sending alerts that it was unable to connect to our servers. Unfortunately, we don't really have much more information than that... so we're going to deploy with vanity again, in hopes that we can gather more information about where the bottleneck is.
Thanks again for your help.
-Steve
from redis-rb.
Well if anyone else stumbles upon this thread, we found the problem: Vanity initiates the connection to Redis during app startup, which causes application instances (under Passenger) to share the same connection. This is bad and causes application instances to hang and eventually freeze up Apache itself.
See this thread for a fix: http://groups.google.com/group/vanity-talk/browse_thread/thread/532d0f4e707cf814?pli=1
from redis-rb.
YEah using redis-rb with passenger you need to make sure you redis objects dont get created until after the passenger process is forked, otherwise all yoru passengers will share the same redis socket and badness unnsues.
from redis-rb.
Related Issues (20)
- `.connection` method raises error in a Sentinel-based setup HOT 2
- redis-client requires Redis 6+ with HELLO command available HOT 2
- SORT_RO support HOT 1
- `ERR value is not an integer or out of range` after redis.ping HOT 4
- LMPOP not working HOT 5
- Unable to load application: TypeError: superclass mismatch for class Cluster HOT 7
- status
- Sentinel TLS: Sentinel TLS not supported HOT 5
- Configure Rails redis_cache_store with redis 5 HOT 1
- Unable to create redis cluster HOT 1
- Add support for redis Time Series module HOT 1
- OpenSSL::SSL::SSLError: SSL_write: unsupported method HOT 1
- Max number clients reached using subscribe_with_timeout HOT 2
- [Doc] Improve documentation about acceptable regular expressions pattern HOT 4
- Behavior of `pipelined { multi }` changed HOT 1
- 5.x seems to break IPv6 URL parsing HOT 1
- Redis::Cluster attempting Redis connection during asset precompilation HOT 5
- initialize': no implicit conversion of String into Integer (TypeError) HOT 1
- `:blpop` returns an exception when using sentinels HOT 3
- Proper documentation on how to setup rails to connect to a redis cluster for session management HOT 14
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 redis-rb.