Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | 3037782.patch | 964 bytes | Jeremy |
#5 | 0001-Fix-PHP-notice-for-stats-aggregation-on-libevent-key.patch | 724 bytes | ShaunLaws |
#4 | memcache-stats-check_is_numeric-3037782.patch | 606 bytes | benclark |
Comments
Comment #2
rrustamSAI CreditAttribution: rrustamSAI commentedPHP v7.2.14
Apache v2.4.37
Drupal v7.64
memcache module v1.7-beta1
Comment #3
rrustamSAI CreditAttribution: rrustamSAI commentedmemcached v1.5.12
Comment #4
benclark CreditAttribution: benclark commentedI 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!
Comment #5
ShaunLaws CreditAttribution: ShaunLaws as a volunteer commentedPatch for 8.x-2.0, adding 'libevent' to the no aggregation array.
Comment #6
ShaunLaws CreditAttribution: ShaunLaws as a volunteer commentedComment #7
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedIf 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).
Comment #9
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedComment #10
japerry