0

Suddenly my dev site is throwing a fatal error whenever I try to use a drush command, even including drush version or drush cc all. I'm on Drupal 7.50 and CiviCRM 4.7.15, Drush 7.0.0 and I am unaware of any differences between Dev and Production.

What might be causing this? Here is the error message and backtrace:

root@web:/var/www/html/example/docroot# drush status
Drush command terminated abnormally due to an unrecoverable error.                   [error]
Sorry. A non-recoverable error has occurred.
memcached set failed, wondering why?, _b7e34e2ca56a7e5553b56f61bcdd1b97civiroot 
Array

#0 <drupal_root>/sites/all/modules/civicrm/CRM/Utils/Cache/Memcached.php(121): CRM_Core_Error::fatal("memcached set failed, wondering why?, _b7e34e2ca56a7e5553b56f61bcdd1b97civiroot", (Array:0))
#1 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Container/Basic.php(222): CRM_Utils_Cache_Memcached->set("civiroot", (Array:0))
#2 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Container/Basic.php(132): CRM_Extension_Container_Basic->getRelPaths()
#3 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Container/Collection.php(169): CRM_Extension_Container_Basic->getKeys()
#4 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Container/Collection.php(145): CRM_Extension_Container_Collection->getKeysToContainer()
#5 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Container/Collection.php(111): CRM_Extension_Container_Collection->getContainer("org.civicrm.module.cividiscount")
#6 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Mapper.php(185): CRM_Extension_Container_Collection->getPath("org.civicrm.module.cividiscount")
#7 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Mapper.php(224): CRM_Extension_Mapper->keyToInfo("org.civicrm.module.cividiscount")
#8 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Mapper.php(302): CRM_Extension_Mapper->keyToPath("org.civicrm.module.cividiscount")
#9 <drupal_root>/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php(1788): CRM_Extension_Mapper->getActiveModuleFiles(FALSE)
#10 <drupal_root>/sites/all/modules/civicrm/CRM/Utils/Hook.php(266): CRM_Core_PseudoConstant::getModuleExtensions()
#11 <drupal_root>/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(102): CRM_Utils_Hook->requireCiviModules((Array:0))
#12 <drupal_root>/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(81): CRM_Utils_Hook_DrupalBase->buildModuleList()
#13 <drupal_root>/sites/all/modules/civicrm/CRM/Utils/Hook.php(1767): CRM_Utils_Hook_DrupalBase->invoke(1, (Array:152), NULL, NULL, NULL, NULL, NULL, "civicrm_entityTypes")
#14 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO/AllCoreTables.php(51): CRM_Utils_Hook::entityTypes((Array:152))
#15 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO/AllCoreTables.php(277): CRM_Core_DAO_AllCoreTables::init()
#16 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO/OptionGroup.php(179): CRM_Core_DAO_AllCoreTables::invoke("CRM_Core_DAO_OptionGroup", "fields_callback", (Array:8))
#17 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(455): CRM_Core_DAO_OptionGroup::fields()
#18 <drupal_root>/sites/all/modules/civicrm/packages/DB/DataObject.php(411): CRM_Core_DAO->table()
#19 <drupal_root>/sites/all/modules/civicrm/CRM/Core/DAO.php(1082): DB_DataObject->find(TRUE)
#20 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/Manager/Report.php(42): CRM_Core_DAO::getFieldValue("CRM_Core_DAO_OptionGroup", "report_template", "id", "name")
#21 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/System.php(209): CRM_Extension_Manager_Report->__construct()
#22 <drupal_root>/sites/all/modules/civicrm/CRM/Extension/System.php(195): CRM_Extension_System->getManager()
#23 <drupal_root>/sites/all/modules/civicrm/Civi/Core/Container.php(365): CRM_Extension_System->getClassLoader()
#24 <drupal_root>/sites/all/modules/civicrm/CRM/Core/Config.php(111): Civi\Core\Container::boot(TRUE)
#25 <drupal_root>/sites/all/modules/civicrm/drupal/civicrm.module(218): CRM_Core_Config::singleton()
#26 <drupal_root>/sites/all/modules/civicrm/drupal/modules/views/civicrm.views.inc(68): civicrm_initialize()
#27 <drupal_root>/profiles/commons/modules/contrib/views/includes/cache.inc(93): civicrm_views_data_alter((Array:293))
#28 <drupal_root>/profiles/commons/modules/contrib/views/includes/cache.inc(75): _views_fetch_data_build()
#29 <drupal_root>/profiles/commons/modules/contrib/views/views.module(1293): _views_fetch_data(NULL, TRUE, FALSE)
#30 <drupal_root>/profiles/commons/modules/contrib/entity/views/entity.views.inc(320): views_fetch_data()
#31 <drupal_root>/profiles/commons/modules/contrib/views/includes/plugins.inc(414): entity_views_plugins()
#32 <drupal_root>/profiles/commons/modules/contrib/views/includes/cache.inc(145): views_discover_plugins()
#33 <drupal_root>/profiles/commons/modules/contrib/views/views.module(1304): _views_fetch_plugin_data(NULL, NULL, FALSE)
#34 <drupal_root>/profiles/commons/modules/contrib/views/views.module(100): views_fetch_plugin_data()
#35 <drupal_root>/includes/theme.inc(536): views_theme((Array:656), "module", "views", "profiles/commons/modules/contrib/views")
#36 <drupal_root>/includes/theme.inc(689): _theme_process_registry((Array:656), "views", "module", "views", "profiles/commons/modules/contrib/views")
#37 <drupal_root>/includes/theme.inc(325): _theme_build_registry(Object(stdClass), (Array:1), "phptemplate")
#38 [internal function](): _theme_load_registry(Object(stdClass), (Array:1), "phptemplate")
#39 <drupal_root>/includes/theme.inc(277): call_user_func_array("_theme_load_registry", (Array:3))
#40 <drupal_root>/includes/theme.inc(411): theme_get_registry()
#41 <drupal_root>/includes/theme.inc(395): ThemeRegistry->initializeRegistry()
#42 <drupal_root>/includes/theme.inc(335): ThemeRegistry->__construct("theme_registry:runtime:example", "cache")
#43 [internal function](): _theme_load_registry(Object(stdClass), (Array:1), "phptemplate", FALSE)
#44 <drupal_root>/includes/theme.inc(277): call_user_func_array("_theme_load_registry", (Array:4))
#45 <drupal_root>/includes/theme.inc(1020): theme_get_registry(FALSE)
#46 <drupal_root>/sites/all/modules/contrib/seo_checklist/seo_checklist.module(54): theme("image", (Array:3))
#47 [internal function](): seo_checklist_checklistapi_checklist_info()
#48 <drupal_root>/includes/module.inc(957): call_user_func_array("seo_checklist_checklistapi_checklist_info", (Array:0))
#49 <drupal_root>/sites/all/modules/contrib/checklistapi/checklistapi.module(66): module_invoke_all("checklistapi_checklist_info")
#50 <drupal_root>/sites/all/modules/contrib/checklistapi/checklistapi.module(120): checklistapi_get_checklist_info()
#51 <drupal_root>/sites/all/modules/contrib/checklistapi/checklistapi.module(98): checklistapi_menu()
#52 [internal function](): checklistapi_init()
#53 <drupal_root>/includes/module.inc(957): call_user_func_array("checklistapi_init", (Array:0))
#54 <drupal_root>/includes/common.inc(5334): module_invoke_all("init")
#55 <drupal_root>/includes/bootstrap.inc(2523): _drupal_bootstrap_full()
#56 /usr/local/src/drush/lib/Drush/Boot/DrupalBoot7.php(70): drupal_bootstrap(7)
#57 /usr/local/src/drush/includes/bootstrap.inc(308): Drush\Boot\DrupalBoot7->bootstrap_drupal_full()
#58 /usr/local/src/drush/includes/bootstrap.inc(461): drush_bootstrap(5, 7)
#59 /usr/local/src/drush/includes/bootstrap.inc(407): drush_bootstrap_max()
#60 /usr/local/src/drush/lib/Drush/Boot/BaseBoot.php(54): drush_bootstrap_to_phase(-2)
#61 /usr/local/src/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#62 /usr/local/src/drush/drush.php(11): drush_main()
#63 {main}
3
  • 1
    Hi Christia, the error suggest you are using the PHP extension memcached. What is the value of CIVICRM_DB_CACHE_CLASS in your civicrm.settings.php file? Jan 22, 2017 at 13:42
  • The default value is "ArrayCache". This is used when no external caching server is available. Jan 23, 2017 at 17:26
  • 2
    You say the error manifested itself suddenly. That suggests a memcached server was running, but now it is not available anymore. Setting ArrayCache should get your CiviCRM running. After that, you can examine your civicrm.settings.php file what the connection details of the server are (see CIVICRM_DB_CACHE_HOST and CIVICRM_DB_CACHE_PORT). The purpose of a cache is to make the PHP execution faster. Jan 23, 2017 at 18:35

1 Answer 1

2

The fact that the error appears suddenly suggests that a memcached server was used by your system, but is not available anymore. The purpose of this server is to make the PHP execution faster (it stores values in memory that otherwise must be retrieved from the database).

The cache is configured in the civicrm.settings.php file. Look for the variable CIVICRM_DB_CACHE_CLASS. The default value "ArrayCache" is useful for configurations that have no cache server running. The cache server connection details are found in the variables CIVICRM_DB_CACHE_HOST and CIVICRM_DB_CACHE_PORT.

More information about memcached can be found at http://memcached.org/.

Maybe the unix command

sudo systemctl start memcached 

is enough to get it running again.

1
  • Thank you. Running the command to restart memached seems to have done it!
    – Christia
    Jan 25, 2017 at 19:05

Your Answer

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

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