Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fictorial/325627 to your computer and use it in GitHub Desktop.
Save fictorial/325627 to your computer and use it in GitHub Desktop.
>>> import redis
>>> r=redis.Redis()
>>> r.hset('foo','bar',10)
HSET foo bar 2
10
SELECT 0
[16258] 08 Mar 20:26:15 # ======= Ooops! Redis 1.3.4 got signal: -11- =======
[16258] 08 Mar 20:26:15 # redis_version:1.3.4
arch_bits:32
multiplexing_api:epoll
process_id:16258
uptime_in_seconds:19
uptime_in_days:0
connected_clients:1
connected_slaves:0
blocked_clients:0
used_memory:370605
used_memory_human:361.92K
changes_since_last_save:0
bgsave_in_progress:0
last_save_time:1268079956
bgrewriteaof_in_progress:0
total_connections_received:1
total_commands_processed:1
vm_enabled:0
role:master
db0:keys=1,expires=0
[16258] 08 Mar 20:26:15 # ./redis-server(sdslen+0x7) [0x8060ac7]
[16258] 08 Mar 20:26:15 # 2 redis-server 0x805bcb7 call + 39
[16258] 08 Mar 20:26:15 # 3 redis-server 0x805cccf processCommand + 1055
[16258] 08 Mar 20:26:15 # 4 redis-server 0x805bf0d processInputBuffer + 141
[16258] 08 Mar 20:26:15 # 5 redis-server 0x805db48 readQueryFromClient + 168
[16258] 08 Mar 20:26:15 # ./redis-server(aeProcessEvents+0x156) [0x804bd16]
[16258] 08 Mar 20:26:15 # ./redis-server(aeMain+0x37) [0x804bf27]
[16258] 08 Mar 20:26:15 # ./redis-server(main+0xff) [0x80600ef]
[16258] 08 Mar 20:26:15 # /lib/libc.so.6(__libc_start_main+0xe5) [0xb7dae775]
[16258] 08 Mar 20:26:15 # ./redis-server [0x804b321]
HSET foo bar 2
10
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/redis/client.py", line 709, in hset
File "build/bdist.linux-i686/egg/redis/client.py", line 299, in format_bulk
File "build/bdist.linux-i686/egg/redis/client.py", line 228, in execute_command
File "build/bdist.linux-i686/egg/redis/client.py", line 219, in _execute_command
File "build/bdist.linux-i686/egg/redis/client.py", line 50, in send
File "build/bdist.linux-i686/egg/redis/client.py", line 30, in connect
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.
>>>
[3]- Done ./redis-server redis.conf
brian@li104-41:~/redis$ git diff redis.conf
diff --git a/redis.conf b/redis.conf
index 0ed593d..1ff04cd 100644
--- a/redis.conf
+++ b/redis.conf
@@ -25,7 +25,7 @@ timeout 300
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
-loglevel verbose
+loglevel warning
# Specify the log file name. Also 'stdout' can be used to force
# the demon to log on the standard output. Note that if you use standard
@@ -35,7 +35,7 @@ logfile stdout
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
-databases 16
+databases 1
################################ SNAPSHOTTING #################################
#
@@ -53,9 +53,9 @@ databases 16
#
# Note: you can disable saving at all commenting all the "save" lines.
-save 900 1
-save 300 10
-save 60 10000
+#save 900 1
+#save 300 10
+#save 60 10000
# Compress string objects using LZF when dump .rdb databases?
# For default that's set to 'yes' as it's almost always a win.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment