Resource icon

Redis View Counters 1.1.3

No permission to download
I got this:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Truncated incorrect DOUBLE value: '1011730topic_id413672' - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, Yesterday at 8:15 PM
Stack Trace
#0 /library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /library/SV/RedisViewCounter/XenForo/Model/Thread.php(78): Zend_Db_Adapter_Abstract->query('UPDATE xf_threa...', Array)
#3 /library/Tinhte/XenTag/XenForo/Model/Thread.php(51): SV_RedisViewCounter_XenForo_Model_Thread->updateThreadViews()
#4 /library/XenForo/CronEntry/Views.php(13): Tinhte_XenTag_XenForo_Model_Thread->updateThreadViews()
#5 /library/XenForo/Model/Cron.php(355): XenForo_CronEntry_Views::runViewUpdate(Array)
#6 /library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#7 /library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Cron->execute(Array, Array, 7.9999988079071, '')
#8 /library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999988079071, '', false)
#9 /library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#10 /deferred.php(23): XenForo_Model_Deferred->run(false)
#11 {main}
Request State
array(3) {
["url"] => string(39) "http://www.domain.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(87) "/threads/1016917/"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
@RoldanLT do you have Lua enabled, or have the phpredis extension installed?

That is a baffling error and I'm unsure why it is occurring, but I'll implement some workarounds for it.
 
@RoldanLT do you have Lua enabled
Yes Xon.
or have the phpredis extension installed?
77Ud7gm.png
 
Hello, first thank you very much by addon

I am getting this error several times a day, I have the latest version of Redis cache functioning properly.

Code:
ErrorException: preg_match() expects parameter 2 to be string, array given - library/SV/RedisViewCounter/XenForo/Model/Thread.php:54
Generated By: Cuenta desconocida, Hace 17 minutos
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'preg_match() ex...', '/home/nginx/dom...', 54, Array)
#1 ../public/library/SV/RedisViewCounter/XenForo/Model/Thread.php(54): preg_match('/^[0-9]+$/', Array)
#2 ../public/library/XenForo/CronEntry/Views.php(13): SV_RedisViewCounter_XenForo_Model_Thread->updateThreadViews()
#3 ../public/library/XenForo/Model/Cron.php(355): XenForo_CronEntry_Views::runViewUpdate(Array)
#4 ../public/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#5 ../public/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Cron->execute(Array, Array, 7.9999990463257, '')
#6 ../public/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999990463257, '', false)
#7 ../public/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#8 ../public/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}
Solicitar estado
array(3) {
  ["url"] => string(32) "https://360full.net/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(3) {
    ["_xfRequestUri"] => string(36) "/threads/pregunta-sobre-xkey.100458/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I use redis 3.2.0 on centminmod vps

Code:
redis-cli info
# Server
redis_version:3.2.0
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ae5ce1900d9386a6
redis_mode:standalone
os:Linux 2.6.32-642.el6.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.7
process_id:6826
run_id:be8d4dd16310fbeb58350bb00a1d522784f28cfc
tcp_port:6379
uptime_in_seconds:1801148
uptime_in_days:20
hz:10
lru_clock:6813772
executable:/usr/bin/redis-server
config_file:/etc/redis.conf
 
What version of phpredis are you using? Or is it pure-php provided by my add-on?
This matters, as it is what is actually talking to Redis.

What is the Redis config you are using in your config.php?
 
It is pure php provider by your addon, I don't install phpredis

config.php
Code:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xf_',
'automatic_serialization' => false,
'lifetime' => 0
);


$config['cache']['backend'] = 'Redis';
$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'database' => 8,
'use_lua' => true,
);
require(XenForo_Application::getConfigDir().'/SV/RedisCache/Installer.php');

ScreenShot_20160620164759.webp
 
Last edited:
It is pure php provider by your addon, I don't install phpredis

config.php
Code:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xf_',
'automatic_serialization' => false,
'lifetime' => 0
);


$config['cache']['backend'] = 'Redis';
$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'database' => 8,
'use_lua' => true,
);
require(XenForo_Application::getConfigDir().'/SV/RedisCache/Installer.php');

View attachment 136193
That should be working. Can you try installing phpredis? There is now a stable php7 version.

If this prevents your problem then it is a bug in the pure php provider somewhere which I'll need to debug likely next weekend.

Failing that, try deleting the potentially weird values:
Code:
redis-cli keys \*view\* | xargs redis-cli del
Or just clear everything:
Code:
redis-cli flushall
 
Top Bottom