python-memcached icon indicating copy to clipboard operation
python-memcached copied to clipboard

Fetch SERVER_MAX_VALUE_LENGTH from server

Open ramnes opened this issue 6 years ago • 2 comments

Hey there,

Thanks for the neat library.

Today I've been hit by memcache.SERVER_MAX_VALUE_LENGTH, which is statically defined, whereas it could be fetched from the server with item_size_max from stats settings.

Would that be a feature of your interest?

ramnes avatar Apr 30 '18 16:04 ramnes

I tested memcache with this feature completely removed. Everything seemed to work fine. If an object that is too large is sent, the server returns an error and memcache handles it appropriately. I do not think this does not need to be handled on the python side at all.

drhagen avatar Mar 22 '19 20:03 drhagen

A simple example of this issue is:

Set up a memcached server with a 5MB item_size_max and then trying saving something larger than 1MB. It'll fail.

Then edit memcache.SERVER_MAX_VALUE_LENGTH and mke that 5MB or more and it will work

StevenMapes avatar May 20 '20 14:05 StevenMapes