?
avatar acs-ferreira
acs-ferreira
20 Oct 2016

After upgrading from 3.6.2 to 3.6.3, without changing my configuration, i have cache issues probelms. When enabling the cache (conservative or progressive, on File (RamDisk) or APCu), i have issues like blank pages, cache not filled Up (APCu) or Internal Server Error 500.

Please note that both systems use RAM (Ramdisk or APCu)

After disabling the cache, no more problems.

One exact same copy of this site on the same server, under 3.6.2, works just fine.

Steps to reproduce the issue

Enable the cache on RamDisk (file) or APCu.

Expected result

Cache should work like 3.6.2

Actual result

Sometimes cache is not filled up (some page), causing blank pages on browser or even 500 ERROR.
Nothing on PHP or Apache error log files.

Screenshot

System information (as much as possible)

  • Linux 3.13.0-83
  • Database Version 5.6.33
  • PHP Version 7.0.12
  • APCu 5.1.6
  • Web Server Apache/2.4.18 (Unix) OpenSSL/1.0.1f
  • WebServer to PHP Interface fpm-fcgi
  • Joomla! Version Joomla! 3.6.3 Stable [ Noether ]
  • Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ]
avatar acs-ferreira acs-ferreira - open - 20 Oct 2016
avatar acs-ferreira
acs-ferreira - comment - 20 Oct 2016

I've just tested with file cache (no Ramdisk) same result.

Only Cache Disabled works fine.

Also, Page Cache Plugin is disabled.

avatar mbabker
mbabker - comment - 20 Oct 2016

I'm going to suggest this is something very platform specific. If there were indeed a problem in the cache API, joomla.org itself would've crashed once it was updated.

avatar brianteeman brianteeman - close - 20 Oct 2016
avatar acs-ferreira acs-ferreira - close - 20 Oct 2016
avatar acs-ferreira
acs-ferreira - comment - 20 Oct 2016

After disabling and re-enabling all backend (server) services, all seems good.

avatar acs-ferreira acs-ferreira - change - 20 Oct 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-10-20 17:06:36
Closed_By acs-ferreira
avatar acs-ferreira acs-ferreira - close - 20 Oct 2016
avatar brianteeman brianteeman - change - 20 Oct 2016
Labels Added: ?
avatar acs-ferreira
acs-ferreira - comment - 20 Oct 2016
avatar acs-ferreira acs-ferreira - change - 20 Oct 2016
Status Closed New
Closed_Date 2016-10-20 17:06:36
Closed_By acs-ferreira
avatar acs-ferreira acs-ferreira - reopen - 20 Oct 2016
avatar acs-ferreira acs-ferreira - reopen - 20 Oct 2016
avatar mbabker
mbabker - comment - 20 Oct 2016

It's tricky to deal with this, contrary to what the blog post says.

The unserialize() function emits a notice and returns a boolean false on failure. Yet it's possible for a boolean false value to be cached, so that alone can't be the check. At best, maybe a custom error handler could be set (and reverted) with each use of the function.

avatar csthomas
csthomas - comment - 21 Oct 2016

If the problem occurs in the write cache, then that probably something wrong with using flock function.
If the problem back a lots of time then I suggest to test PR #10767

It may help to not generate errors,
after error occurs only restart (if RAM) or clear all /cache folder can help.

If error still occurs after you apply #10767 then the error is somewhere else.

IMHO Joomla does not use flock properly and data is written without any locking.

Someone tried to check integrity at https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/cache/storage/file.php#L135
but this is not the best way (in my opinion).

avatar brianteeman brianteeman - change - 23 Oct 2016
Category Cache
avatar acs-ferreira
acs-ferreira - comment - 25 Oct 2016

This PR mentions file cache system, could this be applied to APCu cache system too ?

avatar mbabker
mbabker - comment - 25 Oct 2016

APC(u) caching uses PHP's native functions so some stuff is covered by that. Using the filesystem as the cache handler, we have to implement some things ourselves that would otherwise be covered by a dedicated caching engine.

avatar csthomas
csthomas - comment - 25 Oct 2016

I do not know if my PR #12556 can help but it fixes an error which may be related to your issue.

[Updated]
Some time ago I have prepared another PR #12312 for cache controllers that can help too.

Most important part is at:
https://github.com/joomla/joomla-cms/pull/12312/files#diff-9673ad112e83780ff1c42edeb527d7b2R199

which do not allow to store data if resource is still locked.

avatar acs-ferreira
acs-ferreira - comment - 5 Nov 2016

@csthomas i've tried your PR #12556 and it seems that it solves my problem !

Before apply the PR, one of my pages was always a blank page, after the PR, no more blank page.

Also, no more 500 Internal Server Error at this time.

Thanks!!

EDIT: After a more extensive test, blank pages are back again :(

But no more 500 Internal Server Error at this time...

My only solution, at this moment, is disabling cache.

I have to remember that before v3.6.2 i've never had this problem (no new extensions, only server software updates).

My setup is, for the record:

  • Joomla 3.6.4 Multi-language (FR & EN)
  • Ubuntu 14.04 (VPS w/ 2 vCores + 4Gb RAM)
  • Apache/2.4.18 + nGinx/1.11.5 (reverse proxy)
  • PHP-FPM 7.0.12 w/ opCache enabled
  • APCU 5.1.7
avatar brianteeman
brianteeman - comment - 5 Nov 2016

I am closing this here then

@acs-ferreira please mark a successful test at https://issues.joomla.org/tracker/joomla-cms/12556

avatar brianteeman brianteeman - change - 5 Nov 2016
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-11-05 23:56:52
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Nov 2016
avatar brianteeman brianteeman - close - 5 Nov 2016
avatar acs-ferreira
acs-ferreira - comment - 5 Nov 2016

@brianteeman i've edited my post, full tests aren't conclusive at this time.
This should be re-opened.

testing #12312 at this time.

avatar acs-ferreira
acs-ferreira - comment - 6 Nov 2016

Same problem with #12312.

avatar csthomas
csthomas - comment - 7 Nov 2016

If you want to test #12312 please test it together with #12556 which is current only for APC.

Your problem is currently more wide than one PR.
There are other issues in joomla that can generate the blank pages.

For more details you should set Global Configuration -> Server Settings -> Error Reporting as Maximum and then check php error file, ex. error_log

avatar acs-ferreira
acs-ferreira - comment - 7 Nov 2016

That's what i've done, one PR, other PR, both PR.

My error_log (Apache and PHP) are empty.

avatar csthomas
csthomas - comment - 7 Nov 2016

Then it may be related to your environment. I would suggest to check php-fpm server logs.

avatar acs-ferreira
acs-ferreira - comment - 7 Nov 2016

No doubt, what i can't understand is, why the same environment, BUT with j3.6.3, has no problems at all...
Still investigating on my side.

Add a Comment

Login with GitHub to post a comment