Change memcache_socket_timeout to a float
It's not unusual to set 0.25 as a socket_timeout value, and this was not possible. This can have a dramatic impact for performance when one memcached server is down, especially when keystone is involved. Change-Id: I01356b7873ad78cb38779f5c5ddd2b932889c911 Partial-Bug: #1731921
This commit is contained in:
parent
bcabe943fe
commit
6f320b4b98
@ -76,8 +76,8 @@ FILE_OPTIONS = {
|
|||||||
help='Number of seconds memcached server is considered dead'
|
help='Number of seconds memcached server is considered dead'
|
||||||
' before it is tried again. (dogpile.cache.memcache and'
|
' before it is tried again. (dogpile.cache.memcache and'
|
||||||
' oslo_cache.memcache_pool backends only).'),
|
' oslo_cache.memcache_pool backends only).'),
|
||||||
cfg.IntOpt('memcache_socket_timeout',
|
cfg.FloatOpt('memcache_socket_timeout',
|
||||||
default=3,
|
default=3.0,
|
||||||
help='Timeout in seconds for every call to a server.'
|
help='Timeout in seconds for every call to a server.'
|
||||||
' (dogpile.cache.memcache and oslo_cache.memcache_pool'
|
' (dogpile.cache.memcache and oslo_cache.memcache_pool'
|
||||||
' backends only).'),
|
' backends only).'),
|
||||||
|
@ -45,7 +45,7 @@ class PooledMemcachedBackend(memcached_backend.MemcachedBackend):
|
|||||||
self.url,
|
self.url,
|
||||||
arguments={
|
arguments={
|
||||||
'dead_retry': arguments.get('dead_retry', 5 * 60),
|
'dead_retry': arguments.get('dead_retry', 5 * 60),
|
||||||
'socket_timeout': arguments.get('socket_timeout', 3),
|
'socket_timeout': arguments.get('socket_timeout', 3.0),
|
||||||
},
|
},
|
||||||
maxsize=arguments.get('pool_maxsize', 10),
|
maxsize=arguments.get('pool_maxsize', 10),
|
||||||
unused_timeout=arguments.get('pool_unused_timeout', 60),
|
unused_timeout=arguments.get('pool_unused_timeout', 60),
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
`memcache_socket_timeout` is changed to float, given the same default value
|
||||||
|
'3.0'.
|
Loading…
Reference in New Issue
Block a user