Skip to content

Commit

Permalink
memcache: use sockets for nutcracker (#5381)
Browse files Browse the repository at this point in the history
Also lower timeout to 500 ms.
  • Loading branch information
paladox authored Nov 26, 2023
1 parent 8a7f896 commit 101beca
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions GlobalCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
'class' => MemcachedPeclBagOStuff::class,
'serializer' => 'php',
'persistent' => false,
'servers' => [ '127.0.0.1:11212' ],
'servers' => [ '/var/run/nutcracker/nutcracker_1.sock:0' ],
// Effectively disable the failure limit (0 is invalid)
'server_failure_limit' => 1e9,
// Effectively disable the retry timeout
'retry_timeout' => -1,
'loggroup' => 'memcached',
// 1000ms, in microseconds
'timeout' => 1.0 * 1e6,
// 500ms, in microseconds
'timeout' => 0.5 * 1e6,
];

// mem131
$wgObjectCaches['memcached-mem-2'] = [
'class' => MemcachedPeclBagOStuff::class,
'serializer' => 'php',
'persistent' => false,
'servers' => [ '127.0.0.1:11214' ],
'servers' => [ '/var/run/nutcracker/nutcracker_2.sock:0' ],
// Effectively disable the failure limit (0 is invalid)
'server_failure_limit' => 1e9,
// Effectively disable the retry timeout
'retry_timeout' => -1,
'loggroup' => 'memcached',
// 500ms, in microseconds
'timeout' => 1.0 * 1e6,
'timeout' => 0.5 * 1e6,
];

$wgObjectCaches['mysql-multiwrite'] = [
Expand Down Expand Up @@ -146,14 +146,14 @@
'class' => MemcachedPeclBagOStuff::class,
'serializer' => 'php',
'persistent' => false,
'servers' => [ '127.0.0.1:11215' ],
'servers' => [ '/var/run/nutcracker/nutcracker_test.sock:0' ],
// Effectively disable the failure limit (0 is invalid)
'server_failure_limit' => 1e9,
// Effectively disable the retry timeout
'retry_timeout' => -1,
'loggroup' => 'memcached',
// 500ms, in microseconds
'timeout' => 1.0 * 1e6,
'timeout' => 0.5 * 1e6,
];

$redisServerIP = '[2a10:6740::6:406]:6379';
Expand Down

0 comments on commit 101beca

Please sign in to comment.