Bug php7 + memcache

Status
Not open for further replies.

desirulez

Customer
Wondering if an one has ran into a issue running php7 & memcached?

Testing right now & im seeing a pass & fail on the flush cache test


Out of 5 system tests in vbopimise pro, its fails twice & passes 3 times, basically every other test is a pass/fail
 
Hi there,

Sorry, I'm very much confused as to what exactly you're saying. Are you saying it's randomly passing or failing on the "Flush Cache" test?
 
Its not really random, its basically passing & failing on every other click of the "system test" feature of vboptimise pro
 
There are no log entries anyplace, i log php errors to a separate log, i also checked the apache logs, nothing there either.

php reports no start up issues with the pecl-memcache or memcached itself on start up of apache.


memcache-fail.jpg
 
Last edited:
Doing some testing & i can see it actually doesnt flush memcache, its adding items, but it wont flush, so even though it actually shows that it passed a test, its actually not.


Edit to add:

Running Test: Connection to memcache
Test completed successfully
Running Test: Store Cache
Test completed successfully
Running Test: Fetch Cache
Test completed successfully

Those always pass.
 
Last edited:
Have you tried an alternative cache system like Redis? If there's a bug in the PHP extension for Memcached for PHP 7, using an alternative may be preferred. Redis also supports distributed servers like Memcached.
 
No, i havent, im posting this because this is a paid for addon with you.

This is just a test site with php 7, im guessing you havent updated to php 7 coding for using function __construct() in your code, as its needed for vbulletin 4?

Im running opcache with php 7 at this point & would like to stick to it, along with memcached for var.
 
No, i havent, im posting this because this is a paid for addon with you.
That doesn't change the fact that the issue is most likely not in our product.

We call this function when flushing the Memcache cache: PHP: Memcache::flush - Manual

If that function has no effect, then the issue isn't in our mod.

Furthermore, other people have issues flushing the cache in Memcache as well: php - Memcache won't flush or clear memory - Stack Overflow
Turns out, if you give Memcache too much memory, it won't properly flush the cache when you request a flush, and the next time you try to request the variable it still shows as being in memory, which in terms of vBO would show up as a fail.

For that reason, since you are reporting that it toggles between success and fail, that leads me to believe this design flaw in Memcache is the root cause of the problem, and not our mod.

This is just a test site with php 7, im guessing you havent updated to php 7 coding for using function __construct() in your code, as its needed for vbulletin 4?
I am running vB Optimise locally using PHP 7 with no issue :)

I recommended Redis because I have experience running Redis on PHP 7 with no issues. There are also multiple articles/posts describing why Redis is superior to Memcache:
Why Redis beats Memcached for caching | InfoWorld
caching - Memcached vs. Redis? - Stack Overflow

We use Redis here @ DBTech as well, although we're only running PHP 5.6 at the moment.
 
I changed it over to redis.

Redis server went away on line 81 in /forums/dbtech/vboptimise/includes/operators/redis.php
#0 forums/dbtech/vboptimise/includes/operators/redis.php(81): Redis->get('ownc_vb.optimis...')
#1 /forums/dbtech/vboptimise/includes/class_operator_model.php(44): vb_optimise_redis->_get('vb.optimiser.st...')
#2 /forums/dbtech/vboptimise/includes/class_operator_model.php(87): vb_optimise_operator->get('vb.optimiser.st...')
#3 /forums/dbtech/vboptimise/actions/admin/flush.php(8): vb_optimise_operator->flush(false)
#4 /forums/a40gnwopcd/vboptimise.php(80): include_once('/home/f...')
#5 {main}
 
I set redis logging to verbose, but i dont even see a connection attempt when i test the system, even though it states it went away.
 
What version of the phpRedis extension are you running? Also, have you configured config.php to point to your Redis servers like so:

Code:
$config['Misc']['redisServers'] = array(
    array('127.0.0.1' , 6379),
);
$config['Misc']['redisMaxDelay'] = 10; // is slave server is out of sync by more than this many seconds, switch to master
$config['Misc']['redisTimeout'] = 3; // if redis server doesn't respond in this many seconds, disconnect
$config['Misc']['redisRetry'] = 100; // retry connection in this many milliseconds
 
Crap, didnt notice that i fat fingered the config.php for resdis, thats fixed.

It appears that its doing the same thing as memcached, randomly fails & passes the flush test.
 
That's really strange, I tested it extensively locally @ PHP 7 when I first created the integration.


Could you please create and PM me with a temporary FTP and AdminCP account?

For security reasons, we recommend you create a new FTP account only for DBTech support, then disable or delete it after we have both confirmed the issue has been solved and there are no further issues.

The same applies to AdminCP accounts; they should ideally be temporary accounts created for us only. If we have created an account on your site already, you can optionally boost that account to Administrator and then de-admin this account once the issue has been solved.

If you use a .htaccess password protection for your AdminCP directory, it is recommended that you create a new authorised user for DBTech and remove this user once the issue has been solved.

Please test any temporary accounts you create to ensure that the FTP account has access to the forum files, and that the AdminCP account can access the administrative controls for the product we are assisting you with.

Ensuring this is all in order before submitting the information will significantly speed up the process of assisting you. We will alert you via PM if there's any issues with the login information you have provided.

When sending the PM, for your security you should also un-tick the "Save a copy in my Sent Items folder" checkbox. When the access details have been received, we will delete the PM from our inbox. Ensuring you have not kept a copy of the PM reduces the risk of security breaches.

Thank you for helping us debug our products and allowing us to assist you, we appreciate it :D
 
This happened because you had the "Alternate Flushing" method turned on in the Misc Settings. This should only ever be enabled for XCache with Admin Auth turned on. I have disabled that setting and the flushing now works as expected.
 
Didnt even chk that they had enabled that feature, thanks Fillip H..

That was probably the issue for memcached as well, ill ahve to disable that on their live site as well.
 
Status
Not open for further replies.

Legacy vB Optimise

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,972
Customer rating
0.00 star(s) 0 ratings
Back
Top