-1

I have a problem with nginx, php5-fpm, apc-cache, and Magento-1.8.1. always I enable apc the nginx shows an error... the server has 4GB RAM and runs nginx+php5 and the MySQL database

software & versions:

ii  nginx-common                      1.6.0-1~bpo70+1               all          small, powerful, scalable web/proxy server - common files
ii  nginx-full                        1.6.0-1~bpo70+1               amd64        nginx web/proxy server (standard version)
ii  php-apc                           3.1.13-1                      amd64        APC (Alternative PHP Cache) module for PHP 5
ii  php5                              5.4.4-14+deb7u10              all          server-side, HTML-embedded scripting language (metapackage)
ii  php5-fpm                          5.4.4-14+deb7u10              amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)

into my .../app/etc/local.xml i added:

<cache>
   <backend>apc</backend>
   <prefix>SHOPprod_</prefix>
</cache>

my apc.ini looks like:

extension=apc.so
apc.enabled=1
apc.shm_size=128M
apc.num_files_hint=1024
apc.user_entries_hint=1024
apc.max_file_size=10M
apc.mmap_file_mask = /tmp/apc.XXXXXX
apc.stat=0
apc.ttl = 7200
apc.user_ttl  = 7200
apc.optimization=0
apc.shm_segments=1
apc.enable_cli=1
apc.cache_by_default=1
apc.include_once_override=1

activating the apc-cache instantly results in the error if I want to go to the checkout-page: 'Bad Gateway' when activating I do:

  1. enable apc-cach in ini-file
  2. commenting in the part in local.xml (optionally, also tested as opcode-cache only)
  3. php5-fpm restart
  4. clearing caches through Magento cache-management
  5. deleting zend-cache---* files.
  6. Logging in as customer
  7. go to checkout-page
  8. Bad Gateway (at least at step2 of onepage-checkout)

any hints?

  • 1
    upgrade php, or replace zendopcache, or check your error logs, – user2857 Jan 18 '15 at 13:36
  • Since PHP 5.5, you can just use the build in opcode cache. No need to use APC. If you're using an older version, it would indeed be good to upgrade like @ADM mentions. – Milan Simek Oct 18 '15 at 17:53
0

Bad Gateway while using PHP_FPM almost always means PHP error, so investigate logs (not PHP-FPM log as it is just a Gateway Interface).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.