Getting "Notice: A non well formed numeric value encountered in dmemcache_stats() (line 627 of /opt/drupal7/modules-all/memcache-1.7-beta1/dmemcache.inc)." when viewing stat @ https://drupal-website/admin/reports/memcache.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rrustamSAI created an issue. See original summary.

rrustamSAI’s picture

Issue summary: View changes

PHP v7.2.14
Apache v2.4.37
Drupal v7.64
memcache module v1.7-beta1

rrustamSAI’s picture

Issue summary: View changes

memcached v1.5.12

benclark’s picture

I ran into the same issue this morning running latest 7.x-1.x. My memcache servers returned a key "libevent" with value "2.0.0-stable" (or something along those lines), and the dmemcache_stats() function was attempting to aggregate it because "libevent" wasn't explicitly listed in $no_aggregate.

The attached patch adds a check for is_numeric() alongside !in_array($no_aggregate), since there's no point in attempting to sum two non-numbers. Another possible approach is to add "libevent" to the $no_aggregate array.

Hope this helps!

ShaunLaws’s picture

Patch for 8.x-2.0, adding 'libevent' to the no aggregation array.

ShaunLaws’s picture

Jeremy’s picture

FileSize
964 bytes

If we simply check if it's integer, we can completely get rid of the no_aggregation array (and maybe avoid similar regressions in the future).

  • Jeremy committed e1359c1 on 7.x-1.x
    Issue #3037782 by ShaunLaws, Jeremy: dmemcache_stats() notice
    
Jeremy’s picture

Version: 7.x-1.x-dev » 8.x-2.x-dev
Status: Active » Patch (to be ported)
japerry’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.