reloading configuration without restarting

5,080 views
Skip to first unread message

Dvir Volk

unread,
Mar 16, 2011, 7:08:29 AM3/16/11
to redi...@googlegroups.com
hey all
is there a way to reload a redis configuration without restarting the server?
the documentation and a quick look at the code suggests that no.

if there isn't, is it safe to iterate over a redis.conf file and simple issue a CONFIG SET command for each line?

Salvatore Sanfilippo

unread,
Mar 16, 2011, 7:10:26 AM3/16/11
to redi...@googlegroups.com, Dvir Volk
On Wed, Mar 16, 2011 at 12:08 PM, Dvir Volk <dvi...@gmail.com> wrote:
> if there isn't, is it safe to iterate over a redis.conf file and simple
> issue a CONFIG SET command for each line?

I don't think so, not all the config parameters are supported, and I
would pay particular attention to persistence...
Better to check with CONFIG GET is everything is fine and only change
the parameters when needed but there must be some logic to avoid
problems.

Cheers,
Salvatore

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Dvir Volk

unread,
Mar 16, 2011, 7:22:41 AM3/16/11
to Salvatore Sanfilippo, redi...@googlegroups.com
thanks.
is it possible to simply add  something like CONFIG RELOAD to redis, that just calls loadServerConfig()?
or will it break stuff if done during operation?
--
Dvir Volk
System Architect, Do@, http://doat.com

Dvir Volk

unread,
Mar 16, 2011, 7:23:00 AM3/16/11
to Salvatore Sanfilippo, redi...@googlegroups.com
thanks.
is it possible to simply add  something like CONFIG RELOAD to redis, that just calls loadServerConfig()?
or will it break stuff if done during operation?

On Wed, Mar 16, 2011 at 1:10 PM, Salvatore Sanfilippo <ant...@gmail.com> wrote:

Salvatore Sanfilippo

unread,
Mar 16, 2011, 7:34:16 AM3/16/11
to Dvir Volk, redi...@googlegroups.com
On Wed, Mar 16, 2011 at 12:22 PM, Dvir Volk <dvi...@gmail.com> wrote:
> thanks.
> is it possible to simply add  something like CONFIG RELOAD to redis, that
> just calls loadServerConfig()?
> or will it break stuff if done during operation?

Not planned for now, it is uncertain if we'll take this step or the
reverse CONFIG WRITE after hackig with CONFIG SET.
It's a good idea but we'll have to study it better before implementing.

Currently the solution is to use CONFIG SET and to change by hand the
configuration in redis.conf.

Salvatore

Reply all
Reply to author
Forward
0 new messages