Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Bunstonious on February 28th, 2014, 08:19 AM

Title: APC Cache Errors
Post by: Bunstonious on February 28th, 2014, 08:19 AM
I notice that I get a few APC error messages, not sure if they are related to an APC misconfiguration on my server, or if they are Wedge related.

"2: apc_store() expects parameter 3 to be long, array given"

I also get an error every time I purge the cache.

Disclaimer: I haven't updated to the latest just yet, will do when I get home and kids are in bed.
Title: Re: APC Cache Errors
Post by: Pandos on February 28th, 2014, 08:59 AM
It's a bug in APC. Latest version of APC resolved the problem. Can you try to update (pecl upgrade apc)?

If not, try to set apc.write_lock = 1 and apc.slam_defense = 0 in php.ini. This should fix the problem.
Title: Re: APC Cache Errors
Post by: Bunstonious on February 28th, 2014, 09:51 AM
Quote from Pandos on February 28th, 2014, 08:59 AM
It's a bug in APC. Latest version of APC resolved the problem. Can you try to update (pecl upgrade apc)?

If not, try to set apc.write_lock = 1 and apc.slam_defense = 0 in php.ini. This should fix the problem.
Thanks bro, will try tonight.

Its latest stable version according to apt
Title: Re: APC Cache Errors
Post by: Nao on February 28th, 2014, 12:37 PM
Quote from Pandos on February 28th, 2014, 08:59 AM
It's a bug in APC. Latest version of APC resolved the problem.
Are you sure..?!
This sounds more like the cache_get_data bug that I added last month, and only recently fixed when I actually started to make use of the cache_put_data helper... (I'd inverted the last two parameters.)
Title: Re: APC Cache Errors
Post by: Bunstonious on February 28th, 2014, 01:41 PM
Out of curiosity, when you purge the cache I always get the below error. Is this by design? I have updated to the latest version.

Bunstonious
Today at 10:39 PM
General
https://forum.awesome.net/do/uncache/
apc_clear_cache() expects exactly 0 parameters, 1 given
/forum/gz/app/Subs-Cache.php
Line: 1701
Title: Re: APC Cache Errors
Post by: Nao on February 28th, 2014, 02:35 PM
Googling it shows it's a bug in APCu that was fixed last year. Make sure you have a recent version of it!
You could just add a @ before the call but the cache clearing op probably fails anyway.
Or just remove the user parameter but that's not compatible with APC so I can't do that.
Sucks.
Title: Re: APC Cache Errors
Post by: Bunstonious on February 28th, 2014, 02:49 PM
Fair enough.

Damn ubuntu and their slow updates.
Title: Re: APC Cache Errors
Post by: Pandos on February 28th, 2014, 07:05 PM
14.04 LTS: "Trusty Tahr" Beta is available. :)
Title: Re: APC Cache Errors
Post by: Bunstonious on February 28th, 2014, 09:56 PM
Quote from Pandos on February 28th, 2014, 07:05 PM
14.04 LTS: "Trusty Tahr" Beta is available. :)
Might run up my netbook as a web server, with arch
Title: Re: APC Cache Errors
Post by: Nao on February 28th, 2014, 11:36 PM
Quote from Bunstonious on February 28th, 2014, 02:49 PM
Fair enough.

Damn ubuntu and their slow updates.
Try this:

1/ Uninstall Ubuntu's ACPu package.
2/ Do this: pecl install apcu-beta
3/ Restart everything.

If you don't have pecl available, you can install it, I'm pretty sure Ubuntu has an 'automatic' package for it. I remember using it some time ago. (I only tested Ubuntu for a short while.)