Clearing Cache crashes pimcore


#1

Hi,

I am experiencing the following issues:
After clearing the Cache I can not access the Admin-Interface.
In fact nothing loads, I just get a white screen…

I am in fact able to access PHPmyadmin so it must have something to do with pimcore.

Can someone here help with this? I have no idea what I should do now

btw, To clear cache I use the following command:
bin/console cache:clear --no-warmup

But even when clearing cache via the admin Interface I geht the same problems


#2

Look into the browser developer tools to get more info about that. Or check symfony log files


#3

Developer tools show a 500 Internal Server error and that there is no page.
Apache is running and show no error.

Where can I find the symfony log files?


#4

logfiles in pimcore-4 in /website/var/logs/

Perhaps your php-settings for php-execution-time is to short?

Andreas


#5

Thx, thought in web/var/logs are just logfiles generated through pimcore.

I’ll check for the execution time asap.


#6

Hello again.

In fact there is one logfile that gets created.
It contains the following errors:

[12-Jun-2018 16:29:08 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /opt/ProDaS/pimcore/lib/Pimcore/Cache.php:44
Stack trace:
#0 /opt/ProDaS/pimcore/lib/Pimcore/Cache.php(226): Pimcore\Cache::getHandler()
#1 /opt/ProDaS/src/AppBundle/EventListener/TestListener.php(10): Pimcore\Cache::disable()
#2 /opt/ProDaS/vendor/composer/ClassLoader.php(444): include('/opt/ProDaS/src...')
#3 /opt/ProDaS/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/opt/ProDaS/ven...')
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass('AppBundle\\Event...')
#5 [internal function]: spl_autoload_call('AppBundle\\Event...')
#6 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php(78): class_exists('AppBundle\\Event...')
#7 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php(351): Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0)
#8 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/DependencyInjecti in /opt/ProDaS/pimcore/lib/Pimcore/Cache.php on line 44
[12-Jun-2018 16:29:08 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /opt/ProDaS/pimcore/lib/Pimcore/Cache.php:44
Stack trace:
#0 /opt/ProDaS/pimcore/lib/Pimcore/Cache.php(226): Pimcore\Cache::getHandler()
#1 /opt/ProDaS/src/AppBundle/EventListener/TestListener.php(10): Pimcore\Cache::disable()
#2 /opt/ProDaS/vendor/composer/ClassLoader.php(444): include('/opt/ProDaS/src...')
#3 /opt/ProDaS/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/opt/ProDaS/ven...')
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass('AppBundle\\Event...')
#5 [internal function]: spl_autoload_call('AppBundle\\Event...')
#6 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/Config/Resource/ClassExistenceResource.php(78): class_exists('AppBundle\\Event...')
#7 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php(351): Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0)
#8 /opt/ProDaS/vendor/symfony/symfony/src/Symfony/Component/DependencyInjecti in /opt/ProDaS/pimcore/lib/Pimcore/Cache.php on line 44

Unfortunately I do not know what to do…


#7

web/var/logs are symfony logs, Pimcore just uses them


#8

Thx.

Unfortunately the code quoted in my last post were the only Information I could find. Is it helpful?


#9

maybe your cache configuration is wrong, have you checked that?


#10

Hi,

do you mean these settings?

Or are there more settings anywhere else?


#11

https://pimcore.com/docs/5.x/Development_Documentation/Development_Tools_and_Details/Cache/index.html#page_Configuring-the-cache


#12

Hi,

this is the content of my config.yml

I’ve checked the two ressources, too.

But I can’t find any settings for the cache.
Might this be the problem?


#13

btw, this is the content of my cache.yml

services:
    _defaults:
        autowire: true
        autoconfigure: true

    #
# RUNTIME CACHE
#

Pimcore\Cache\Runtime:
    public: true
    synthetic: true


#
# PIMCORE CACHE
#

Pimcore\Cache\Core\CoreHandlerInterface: '@pimcore.cache.core.handler'
Pimcore\Cache\Pool\PimcoreCacheItemPoolInterface: '@pimcore.cache.core.pool'

# the actual core handler which is used from Pimcore\Cache
# the pimcore.cache.core.pool service is defined by config
# and set in PimcoreExtension

pimcore.cache.core.handler:
    public: true
    class: Pimcore\Cache\Core\EventDispatchingCoreHandler
    arguments:
        - '@pimcore.cache.core.pool'
        - '@pimcore.cache.core.write_lock'
        - '@event_dispatcher'
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

# CORE CACHE POOLS
# filesystem cache pool
pimcore.cache.core.pool.filesystem:
    class: Pimcore\Cache\Pool\SymfonyAdapterProxy
    arguments:
        - '@pimcore.cache.core.symfony_adapter.filesystem'
        - '%pimcore.cache.core.default_lifetime%'
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

# array/in-memory cache pool
pimcore.cache.core.pool.array:
    class: Pimcore\Cache\Pool\SymfonyAdapterProxy
    arguments:
        - '@pimcore.cache.core.symfony_adapter.array'
        - '%pimcore.cache.core.default_lifetime%'
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

# SYMFONY ADAPTERS - used in combination with SymfonyAdapterProxy
# filesystem cache adapter
pimcore.cache.core.symfony_adapter.filesystem:
    class: Symfony\Component\Cache\Adapter\FilesystemAdapter
    arguments:
        - 'pimcore'
        - '%pimcore.cache.core.default_lifetime%'
        - '%kernel.cache_dir%/pimcore'
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

# array/in-memory cache adapter
pimcore.cache.core.symfony_adapter.array:
    class: Symfony\Component\Cache\Adapter\ArrayAdapter
    arguments:
        - '%pimcore.cache.core.default_lifetime%'
        - false # do not store serialized
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

# write lock handles locking between processes
pimcore.cache.core.write_lock:
    class: Pimcore\Cache\Core\WriteLock
    arguments: ['@pimcore.cache.core.pool']
    calls:
        - [setLogger, ['@logger']]
    tags:
        - { name: monolog.logger, channel: cache }

#14

thats the regular pimcore cache config right?


#15

That’s right, I never changed it


#16

Maybe the following information might help as well:

When enabling debug mode, the same error occurs.

I then tried to enable debug mode only for one specific IP. With this IP I always got the error.
When Using another IP everything works fine.

So debug-mode seems to trigger the same problem as clearing Cache does…