4
votes

I have a healthy, low-traffic staging server with a CakePHP app. I am running Memcached on localhost, and all Cake caches are using Memcache as the caching engine.

For an hour or two every so often (like every 1-2 weeks), I will see errors like:

Warning (512): _cake_model_ cache was unable to write 'default_read_users' to Memcache cache [CORE/Cake/Cache/Cache.php, line 309]
Warning (512): _cake_core_ cache was unable to write 'file_map' to Memcache cache [CORE/Cake/Cache/Cache.php, line 309]
Warning (512): _cake_core_ cache was unable to write 'method_cache' to Memcache cache [CORE/Cake/Cache/Cache.php, line 309]

This indicates that even core Cake caches are not able to write the the Memcache store.

I'll restart the Memcache daemon on the server, wait a few minutes, and reload the page, and still the error messages linger.

Vitals on the server look fine.

What could cause this?

2
Same problem here. Anybody has a solution? Happen only with Memcached... - gdm
To me this happens if I have a lot of groups defined in the Cache engine. - gdm

2 Answers

1
votes

Could it be that CakeShell was accessed from a user (i.e. root) with permissions higher than those of normal php execution (www-data) so those cache files can not be accessed or changed later from the normal process?

0
votes

Check the Memcached configurations. Maybe the max ItemSize has been reached. You can start Memcached in interactive mode:

memcached -u root --v 

and see if some SERVER ERROR log appears.

You can try increasing the item size:

memcached -u root --vv -I 5m