Bug #40410

Exception when using Apc, Memcached of Redis cache backend for reflection status and object configuration

Added by Kobbe van Daatselaar almost 9 years ago. Updated over 8 years ago.

Status:
Needs Feedback
Priority:
Should have
Category:
Cache
Target version:
-
Start date:
2012-08-30
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Has patch:
No
Complexity:

Description

When I configure to FLOW3 to use an other backend than the (Simple)FileBackend it throws an exception during compiletime:

14 TYPO3\FLOW3\Error\ErrorHandler::handleError(4096, "Argument 1 passed to TYPO3\FLOW3\Object\ObjectManager::setObjects() must be an array, boolean given, called in /Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Scripts.php on line 292 and defined", "/Packages/Framework/TYPO3.FLOW3/Classes/Object/ObjectManager.php", 92, array)
13 TYPO3\FLOW3\Object\ObjectManager::setObjects(boolean)
12 TYPO3\FLOW3\Core\Booting\Scripts::initializeObjectManager(TYPO3\FLOW3\Core\Bootstrap)
11 call_user_func(array, TYPO3\FLOW3\Core\Bootstrap)
10 TYPO3\FLOW3\Core\Booting\Step::__invoke(TYPO3\FLOW3\Core\Bootstrap)
9 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)
8 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)
7 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)
6 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)
5 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)
4 TYPO3\FLOW3\Core\Booting\Sequence::invoke(TYPO3\FLOW3\Core\Bootstrap)
3 TYPO3\FLOW3\Http\RequestHandler::boot()
2 TYPO3\FLOW3\Http\RequestHandler::handleRequest()
1 TYPO3\FLOW3\Core\Bootstrap::run()

This happens when I configure the Object_Configuration or Reflection_Status in Caches.yaml

FLOW3_Object_Configuration:
  backend: TYPO3\FLOW3\Cache\Backend\ApcBackend
FLOW3_Reflection_Status:
  backend: TYPO3\FLOW3\Cache\Backend\ApcBackend

or

FLOW3_Object_Configuration:
    backend: TYPO3\FLOW3\Cache\Backend\MemcachedBackend
    backendOptions:
      servers:
        - 127.0.0.1
FLOW3_Reflection_Status:
    backend: TYPO3\FLOW3\Cache\Backend\MemcachedBackend
    backendOptions:
      servers:
        - 127.0.0.1

or

FLOW3_Object_Configuration:
    backend: TYPO3\FLOW3\Cache\Backend\RedisBackend
    backendOptions:
      database: 3
      compressionLevel: 0
FLOW3_Reflection_Status:
    backend: TYPO3\FLOW3\Cache\Backend\RedisBackend
    backendOptions:
      database: 4
      compressionLevel: 0
<pre>
#1

Updated by Karsten Dambekalns almost 9 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Karsten Dambekalns

When using Redis it works for me, no exceptions whatsoever. APC and memcache fail with a variety of errors. Can you give more details on your errors?

#2

Updated by Kobbe van Daatselaar over 8 years ago

APC (all done in production context)

REFLECTION STATUS

FLOW3_Reflection_Status:
  backend: TYPO3\FLOW3\Cache\Backend\ApcBackend

I get the following error when compiling:

./flow3 flow3:core:compile
PHP Fatal error:  Call to undefined method TYPO3\FLOW3\Cache\Backend\ApcBackend::initializeObject() in /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Reflection/ReflectionService.php on line 189
PHP Stack trace:
PHP   1. {main}() /www/hexia/flow3:0
PHP   2. require() /www/hexia/flow3:28
PHP   3. TYPO3\FLOW3\Core\Bootstrap->run() /www/hexia/Packages/Framework/TYPO3.FLOW3/Scripts/flow3.php:42
PHP   4. TYPO3\FLOW3\Cli\CommandRequestHandler->handleRequest() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Bootstrap.php:112
PHP   5. TYPO3\FLOW3\Cli\CommandRequestHandler->boot() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Cli/CommandRequestHandler.php:91
PHP   6. TYPO3\FLOW3\Core\Booting\Sequence->invoke() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Cli/CommandRequestHandler.php:147
PHP   7. TYPO3\FLOW3\Core\Booting\Sequence->invokeStep() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:73
PHP   8. TYPO3\FLOW3\Core\Booting\Sequence->invokeStep() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:93
PHP   9. TYPO3\FLOW3\Core\Booting\Sequence->invokeStep() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:93
PHP  10. TYPO3\FLOW3\Core\Booting\Sequence->invokeStep() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:93
PHP  11. TYPO3\FLOW3\Core\Booting\Sequence->invokeStep() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:93
PHP  12. TYPO3\FLOW3\Core\Booting\Step->__invoke() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Sequence.php:89
PHP  13. call_user_func() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Step.php:49
PHP  14. TYPO3\FLOW3\Core\Booting\Scripts::initializeReflectionService() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Step.php:49
PHP  15. TYPO3\FLOW3\Reflection\ReflectionService->setStatusCache() /www/hexia/Packages/Framework/TYPO3.FLOW3/Classes/Core/Booting/Scripts.php:316

OBJECT CONFIGURATION

FLOW3_Object_Configuration:
  backend: TYPO3\FLOW3\Cache\Backend\ApcBackend

I get no error when running ./flow3 flow3:core:compile
But when I open a URL in my browser I get:

FLOW3: The compile run failed. Please check the error output or system log for more information.

There is no error in the logs:
12-09-26 10:55:22 2681       NOTICE    FLOW3                Unlocked site.
12-09-26 10:55:22 2685       NOTICE    FLOW3                Locking site. Lock file: /www/hexia/Data/Temporary/Production/FLOW3.lock
12-09-26 10:55:22 2685       INFO      FLOW3                Aspect classes have been modified, flushing the whole proxy classes cache.
12-09-26 10:55:22 2685       INFO      FLOW3                Domain model changes have been detected, triggering Doctrine 2 proxy rebuilding.
12-09-26 10:55:22 2685       INFO      FLOW3                File Monitor "FLOW3_ClassFiles" detected 1771 changed files and 13 changed directories.
12-09-26 10:55:22 2685       INFO      FLOW3                The security policies have changed, flushing the policy cache.
12-09-26 10:55:22 2685       INFO      FLOW3                A Routes.yaml file has been changed, flushing the routing cache.
12-09-26 10:55:22 2685       INFO      FLOW3                The configuration has changed, triggering an AOP proxy class rebuild.
12-09-26 10:55:22 2685       INFO      FLOW3                File Monitor "FLOW3_ConfigurationFiles" detected 63 changed files and 7 changed directories.
12-09-26 10:55:22 2685       INFO      FLOW3                The localization files have changed, thus flushing the I18n XML model cache.
12-09-26 10:55:22 2685       INFO      FLOW3                File Monitor "FLOW3_TranslationFiles" detected 7 changed files and 2 changed directories.
12-09-26 10:55:36 2685       INFO      FLOW3                Reflected 947 emerged classes.
12-09-26 10:55:39 2685       INFO      FLOW3                Aspects have been modified, therefore rebuilding all target classes.
12-09-26 10:55:45 2685       NOTICE    FLOW3                Unlocked site.

#3

Updated by Kobbe van Daatselaar over 8 years ago

MEMCACHED (all done in production context)

OBJECT CONFIGURATION

FLOW3_Object_Configuration:
    backend: TYPO3\FLOW3\Cache\Backend\MemcachedBackend
    backendOptions:
      servers:
        - 127.0.0.1

I get no error when running ./flow3 flow3:core:compile
But when I open a URL in my browser I get:

FLOW3: The compile run failed. Please check the error output or system log for more information.

There is no error in the logs:

12-09-26 11:14:37 2857       NOTICE    FLOW3                Unlocked site.
12-09-26 11:14:42 2863       NOTICE    FLOW3                Locking site. Lock file: /www/hexia/Data/Temporary/Production/FLOW3.lock
12-09-26 11:14:43 2863       INFO      FLOW3                Aspect classes have been modified, flushing the whole proxy classes cache.
12-09-26 11:14:43 2863       INFO      FLOW3                Domain model changes have been detected, triggering Doctrine 2 proxy rebuilding.
12-09-26 11:14:43 2863       INFO      FLOW3                File Monitor "FLOW3_ClassFiles" detected 1771 changed files and 13 changed directories.
12-09-26 11:14:43 2863       INFO      FLOW3                The security policies have changed, flushing the policy cache.
12-09-26 11:14:43 2863       INFO      FLOW3                A Routes.yaml file has been changed, flushing the routing cache.
12-09-26 11:14:43 2863       INFO      FLOW3                The configuration has changed, triggering an AOP proxy class rebuild.
12-09-26 11:14:43 2863       INFO      FLOW3                File Monitor "FLOW3_ConfigurationFiles" detected 63 changed files and 7 changed directories.
12-09-26 11:14:43 2863       INFO      FLOW3                The localization files have changed, thus flushing the I18n XML model cache.
12-09-26 11:14:43 2863       INFO      FLOW3                File Monitor "FLOW3_TranslationFiles" detected 7 changed files and 2 changed directories.
12-09-26 11:14:56 2863       INFO      FLOW3                Reflected 947 emerged classes.
12-09-26 11:14:59 2863       INFO      FLOW3                Aspects have been modified, therefore rebuilding all target classes.
12-09-26 11:15:07 2863       NOTICE    FLOW3                Unlocked site.
#4

Updated by Kobbe van Daatselaar over 8 years ago

In general it would be nice if the caching segment of the documentation was updated with different backend setups (what can be cached and what frontend / backend can be used).

Apparently not all combinations can be used. For example: reflection data can only be cached on disk (which is slow) but it contains the largest amount of data.

#5

Updated by Thomas Plessis over 8 years ago

Kobbe van Daatselaar wrote:

In general it would be nice if the caching segment of the documentation was updated with different backend setups (what can be cached and what frontend / backend can be used).

Agreed with that too! :) I'm a bit confused with all those system cache.

Also available in: Atom PDF