Tag Info

Hot answers tagged

10

Either compile from source or build a .deb package via fpm: Install fpm with gem: # apt-get install rubygems # gem install fpm Compile Redis: # cd /usr/local/src/ # wget http://redis.googlecode.com/files/redis-2.4.16.tar.gz # tar zxvf redis-2.4.16.tar.gz # cd redis-2.4.16/ # make Build .deb package: # mkdir -p /tmp/redis-$VERSION.$$/usr/bin # mkdir ...


10

Your post doesn't describe much in the way of specs (memory on the LS indexer, log volume or much else) but I'll try and answer your questions best I can first. Disclaimer: I'm one of the logstash devs - Apache going nuts was likely a side effect of the logstash process acting up. I'd put that aside for now. The sane way to make ES f/b/s is add more ES ...


8

By default redis listens on 127.0.0.1 have you edited your redis.conf to include the line bind your.private.ip.address ?


7

Create a new config file in /etc/redis/redis-new.conf (copied from redis.conf). Change the pidfile, port, logfile, dir (for the default db) Create a new file /etc/init.d/redis-server-new (copied from the file redis-server). Change the name, pidfile (same as in the config file in 1), deamon_args (the path to the config file in step 1). Make the new file ...


6

You're abusing Nginx's worker_threads. There is absolutely no need to run that many workers. You should run as many workers as you have CPUs and call it a day. If you're running gunicorn on the same server, you should probably limit nginx workers to two. Otherwise, you're just going to thrash the CPUs with all the context switching required to manage all of ...


6

After few days of intense trial and errors, I'm glad to be able to say that I've understood where the bottleneck was, and I'll post it here so that other people can benefit from my findings. The problem lies in the pub/sub connections that I was using with socket.io, and in particular in the RedisStore used by socket.io to handle inter-process ...


6

Is it possible that, in your innermost else block, the call to redis-server is returning immediately, but the server itself is taking more than one second to start up? In that case, wait won't wait long enough.


5

To do this, you need to make sure that your IPTables rules are configured properly. Ubuntu generally leaves their servers wide open by default, which is why I still don't recommend their use as servers unless you are quite well aware of how to do this properly already. I imagine that your iptables -L -nv looks something like this, yes? # iptables -L -nv ...


5

The way we handle this is by creating multiple groups of servers in a layered stack (even if a group currently only needs one instance). The first layer is your Elastic Load Balancer, clearly. The second layer is an Auto Scaling Group of web servers (multi-availability zone). These boot a custom AMI designed be in a proper ready-state for this task on ...


5

I would recommend installing redis on something, your laptop, whatever you have available now. Then generate some nontrivial amount of data shaped like what you plan to store on the eventual server. Say 100,000 values. Then, load that into redis in the way you expect your application to. Then, see how much memory redis is using: redis-cli info | grep ...


5

By default, the SELinux policy will only allow services access to recognized ports associated with those services: # semanage port -l | egrep '(^http_port_t|6379)' http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 # curl http://localhost/redis.php Cannot connect to redis server. - add Redis port (6379) to SELinux policy # ...


4

The output from 'top' might yield some clues. There's a field near the top left labeled '% stolen' which reflects the amount of hardware CPU diverted to other guests on the same physical box. I've seen these kinds of slow downs when the hypervisor decides to allocate more CPU to another guest, especially when I'm performing some long-running CPU-intensive ...


4

At the server side, for a simple failover, you can do it by using Nagios and NRPE. On the Nagios server: define service{ use critical-service host_name B service_description redis:2302 check_command check_tcp!2302 event_handler promote_redis!C!2302 contact_groups ...


3

The trick is to put an init script in your /etc/init.d/ and then use the update-rc.d command to enable/disable it. I use a modified version of this init script. Also take a look at this post. Hope it points you to the right direction.


3

Redis is an in-memory database, you are probably better off looking at something designed to be "on disk", though there are some really nice aspects of redis I have struggled to find elsewhere :(


3

There is two ways: The first is just to specify a numeric --retry value. Then it will use /signal/timeout/KILL/timeoutschedule. I.e. send a terminating signal (specified with--signal` option), then wait the specified number of seconds and then send a KILL signal that could not be ignored by a process and therefore it will be forced to exit. The command will ...


3

It is not an environmental setting, but a default setting. Check the source code: def __init__(self, host='localhost', port=6379, password=None, ... ) Change it in the configuration file: # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. #port 6379 # If you want you can bind a ...


3

Buy another server, do sharding. This is how Redis is intended to work. If that isn't that what you want, then Redis is the wrong software for your purpose.


3

I'm trying to segment a few servers for a Rails project and part of that is entertaining the idea of isolating Resque workers to their own box. I already have Redis broken out, but is it common to put Resque workers elsewhere? I'm going to make this a bit more generic. Is it common to put job processing workers on different machines than the ...


3

What exactly are you asking for? Redis is not officially supported on Windows, so there should be no question about installing it on the RHEL boxes. Redis RPMs are available at http://rpmfind.net/linux/rpm2html/search.php?query=redis Redis is a memory hungry process, so you will want to install it on the instances that have the most spare RAM.


3

Obviously, if you're actively swapping, you have too many. Swap usage doesn't mean you're actively swapping. Swap I/O means you're actively swapping. However, actively swapping isn't the only way excessive application memory use can hurt you. Every byte of memory that applications are actively using is one byte of memory that can't be used as a disk cache. ...


3

This is pretty well covered in the Supervisord intro chapter. Most services will run/work just fine with init.d, and that will be their default, out-of-the-box config. The process managers exist to give you expanded and finer-grained control and monitoring of your critical processes and services if that is something you desire/require.


2

The documentation is very clear on the limitations of nginx for Windows: Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation layer). Only the select() connection processing method is currently used, so high performance and scalability should not be expected. Due to this and some other known issues version of nginx for Windows ...


2

Do you have some source code to dump? It may be connections to database not closed? Processes waiting for HTTP connections that never close. Can you post some logs? Do a ps -ef and make sure nothing is still running. I have seen web processes leave zombies that won't die until you do a kill -9 . Sometimes shutdown doesn't work or doesn't work fully ...


2

When you set up a vhd from VM Depot, you had to go through a few steps, including downloading the baseline image to your own storage account and then registering the image as one or your own usable images. At that point, you're able to spin up brand new Virtual Machines based on that registered image. During that Create Virtual Machine step, you're prompted ...


2

The .rdb itself "cannot" be corrupt as the dump is first saved to a tmp file and renamed to the dump after. Ofcourse there can go something wrong when renaming. So there is a very very small chance, but it is not likely.


2

You could temporary put selinux in permissive mode and let httpd connect to redis, then generate and build a custom policy module using audit2allow


2

You should check the file /proc/meminfo. It contains detailed answers of what you are looking for. Keep this in mind that cache and buffer are essentially free memory, barring dirty pages in cache. When a file is read from disk, it is cached into memory. There exists two copies of the same file in system, one is cached and the other one in disk. Hence, ...


2

You might want to have a look at couchdb which implements replicated key store with a memcache API. It also handles overflow of the memory storage more gracefully than most memcache implementations (a likely outcome during failover). I must admit that I'm not familiar with the details of how it implements replication. All the implementations of 'sticky' ...


2

Edit your config file to set the dir option to the current working directory: # The filename where to dump the DB dbfilename dump.rdb # The working directory. # # The DB will be written inside this directory, with the filename specified # above using the 'dbfilename' configuration directive. # # Also the Append Only File will be created inside this ...



Only top voted, non community-wiki answers of a minimum length are eligible