Heroku [RuntimeException]执行“'缓存时发生错误:clear --no-warmup'”

时间:2018-05-22 01:43:36

标签: php git symfony heroku

试图在Heroku上获得推送大师

这是日志:

  

- - - - >检测到PHP应用

     

- - - - >自举...

     

- - - - >安装平台包......

   - php (7.2.5)

   - nginx (1.8.1)

   - apache (2.4.33)
     

- - - - >安装依赖项......

   Composer version 1.6.4 2018-04-13 12:04:24

   Loading composer repositories with package information

   Installing dependencies from lock file

   Package operations: 47 installs, 0 updates, 0 removals

     - Installing doctrine/lexer (v1.0.1): Downloading (100%)

     - Installing doctrine/annotations (v1.2.7): Downloading (100%)

     - Installing doctrine/collections (v1.3.0): Downloading (100%)

     - Installing doctrine/inflector (v1.1.0): Downloading (100%)

     - Installing doctrine/cache (v1.6.2): Downloading (100%)

     - Installing doctrine/common (v2.6.2): Downloading (100%)

     - Installing doctrine/dbal (v2.5.13): Downloading (100%)

     - Installing twig/twig (v1.35.0): Downloading (100%)

     - Installing paragonie/random_compat (v2.0.11): Downloading (100%)

     - Installing symfony/polyfill-php70 (v1.6.0): Downloading (100%)

     - Installing symfony/polyfill-util (v1.6.0): Downloading (100%)

     - Installing symfony/polyfill-php56 (v1.6.0): Downloading (100%)

     - Installing symfony/polyfill-mbstring (v1.6.0): Downloading (100%)

     - Installing symfony/symfony (v3.4.6): Downloading (100%)         

     - Installing symfony/polyfill-intl-icu (v1.6.0): Downloading (100%)

     - Installing symfony/polyfill-apcu (v1.6.0): Downloading (100%)

     - Installing psr/simple-cache (1.0.0): Downloading (100%)

     - Installing psr/log (1.0.2): Downloading (100%)

     - Installing psr/link (1.0.0): Downloading (100%)

     - Installing psr/container (1.0.0): Downloading (100%)

     - Installing psr/cache (1.0.1): Downloading (100%)

     - Installing fig/link-util (1.0.0): Downloading (100%)

     - Installing doctrine/doctrine-cache-bundle (1.3.2): Downloading (100%)

     - Installing doctrine/instantiator (1.0.5): Downloading (100%)

     - Installing twig/extensions (v1.5.1): Downloading (100%)

     - Installing sensio/framework-extra-bundle (v5.1.4): Downloading (100%)         

     - Installing pagerfanta/pagerfanta (v1.0.5): Downloading (100%)

     - Installing doctrine/orm (v2.5.14): Downloading (100%)

     - Installing jdorn/sql-formatter (v1.2.17): Downloading (100%)

     - Installing doctrine/doctrine-bundle (1.8.1): Downloading (100%)

     - Installing easycorp/easyadmin-bundle (v1.17.12): Downloading (100%)

     - Installing friendsofsymfony/user-bundle (v2.1.1): Downloading (100%)         

     - Installing incenteev/composer-parameter-handler (v2.1.2): Downloading (100%)

     - Installing knplabs/knp-components (1.3.7): Downloading (100%)         

     - Installing knplabs/knp-paginator-bundle (v2.7.2): Downloading (100%)

     - Installing mgilet/notification-bundle (2.0.3): Downloading (100%)         

     - Installing composer/ca-bundle (1.1.0): Downloading (100%)

     - Installing sensiolabs/security-checker (v4.1.7): Downloading (100%)

     - Installing sensio/distribution-bundle (v5.0.21): Downloading (100%)

     - Installing kriswallsmith/assetic (v1.4.0): Downloading (100%)

     - Installing symfony/assetic-bundle (v2.8.2): Downloading (100%)

     - Installing monolog/monolog (1.23.0): Downloading (100%)

     - Installing symfony/monolog-bundle (v3.1.2): Downloading (100%)

     - Installing swiftmailer/swiftmailer (v5.4.9): Downloading (100%)

     - Installing symfony/swiftmailer-bundle (v2.6.7): Downloading (100%)

     - Installing jms/metadata (1.6.0): Downloading (100%)

     - Installing vich/uploader-bundle (1.4.2): Downloading (100%)         

   Generating optimized autoload files

   > Incenteev\ParameterHandler\ScriptHandler::buildParameters

   Creating the "app/config/parameters.yml" file

   > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap

   > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

   PHP Fatal error:  Uncaught Error: Call to undefined function Doctrine\Common\Cache\apc_fetch() in
     

/tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php:41

   Stack trace:

   #0 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(212):
     

学说\共同\缓存\ ApcCache-> doFetch( 'DoctrineNamespa ...')

   #1 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(185):
     

学说\共同\缓存\ CacheProvider-> getNamespaceVersion()

   #2 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(78):
     

学说\共同\缓存\ CacheProvider-> getNamespacedId( '的appbundle \ Entit ...')

   #3 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(211):
     

学说\共同\缓存\ CacheProvider->取( '的appbundle \ Entit ...')

   #4 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/d in /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php
     

第41行

   Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
     

处理以异常终止的symfony-scripts事件

     [RuntimeException]                                                                                                                                                                                                      

     An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                                                                               







     PHP Fatal error:  Uncaught Error: Call to undefined function Doctrine\Common\Cache\apc_fetch() in
     

/tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php:41

     Stack trace:                                                                                                                                                                                                            

     #0 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(212):
     

Doctrine \ Common \ Cache \ ApcCache-> doFetch('DoctrineNamespa ...')

     #1 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(185):
     

Doctrine \ Common \ Cache \ CacheProvider-> getNamespaceVersion()

     #2 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php(78):
     

学说\共同\缓存\ CacheProvider-> getNamespacedId( '的appbundle \ Entit ...')

     #3 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(211):
     

Doctrine \ Common \ Cache \ CacheProvider-> fetch('AppBundle \ Entit ...')

     #4 /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/d in /tmp/build_1dba4daecef38b7f372c2a799dfdbfa5/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php
     

第41行

   install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts]
     

[ - no-progress] [--no-sugges] [-v | vv | vvv | --verbose]   [-o | --optimize-autoloader] [-a | --classmap-authoritative]   [--apcu-autoloader] [--ignore-platform-reqs] [ - ] [] ......

     

!推送拒绝,无法编译PHP应用程序。

     

!推送失败

我的应用中的缓存已经为空

这是我的config_prod.yml:

    imports:
    - { resource: config.yml }

#doctrine:
#    orm:
#        metadata_cache_driver: apc
#        result_cache_driver: apc
#        query_cache_driver: apc

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: nested
        nested:
            type: stream
            path: 'php://stderr'
            level: debug
        console:
            type: console
            process_psr_3_messages: false
doctrine:
    orm:
        metadata_cache_driver: apc

我也做过:

heroku config:set SYMFONY_ENV=prod

1 个答案:

答案 0 :(得分:0)

您正在使用apc,但看起来您没有安装扩展程序,请尝试将其添加到您的composer.json

"require": {
    "ext-apcu": "*"
}
相关问题