3

Can anyone explain me the memcache session parameters used to save Magento sessions in Memcache?

tcp://XX.XX.XX.XX:11211?persistent=1&weight=2&timeout=10&retry_interval=10

Also are there any more parameters allowed besides these 4 general?

1 Answer 1

4

persistent=1

This is a boolean expressed as integer (1=true, 0=false). If true, PHP will leave open its connections to Memcached, which removes approximately 10–100 ms of overhead from each page load (mostly depending on network distance and congestion).

weight=2

This defines server priority (I think a higher weight means the server is chosen first), assuming you have multiple Memcached instances defined. This supports architectural goals of increased redundancy and decreased outages by providing alternate session storage locations.

timeout=10

How many seconds should PHP wait for a connection to this server? In practice, Memcached should respond very quickly and there’s little value in waiting more than 1 second for a server to respond.

retry_interval=10

How many seconds should PHP wait before retrying a connection to this server? This configuration parameter is also not worth setting to more than 1 second (because when experiencing failures you might as well fail fast and show something, rather than making users wait a long time).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.