As all fetches of cache are really only useful if they can quickly generate a result, the DatabaseCacheBackend and perhaps other backends should have a time out on their get request.

Service unavailability and bulk deletions #2222635: Waiting for table metadata lock on cache_field table will potentially make a request too long. At the Cache layer we should time out so a request can be generated.

For DatabaseCacheBackend this would be a session lock timeout and could be done by extending the get method.

For things like Memcache it seems there's only a setting on a Memcache instance (Memcached::OPT_CONNECT_TIMEOUT/Memcached::OPT_RECV_TIMEOUT/Memcached::OPT_SEND_TIMEOUT/Memcached::OPT_POLL_TIMEOUT).

What's a good default for this? 200ms? (WAG)

Comments

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Berdir’s picture

Status: Active » Closed (won't fix)

As far as I see, there is no interest in this.

A timeout could be implement as a setting, doesn't need to be something that is part of the API.