-1

I am on a dedicated server with my site hosted in a virtual directory. There are few other sites hosted in different virtual directories. I have APC and APCu installed. When i restart PHP-FPM i get the following error:

PHP Warning: Module 'apc' already loaded in Unknown on line 0

My APC and APCu configuration are as following:

  • APC.ini configuration

; Enable apc extension module extension = apc.so ; Options for the APC module version >= 3.1.3 apc.enabled=1 apc.shm_segments=1 apc.shm_size=2024M

  • APCu.ini configuration

; Enable apcu extension module extension = apcu.so

; Options for the APCu module version >= 4.0.0 apc.enabled=1 apc.shm_segments=1 apc.shm_size=2024M ..and so on

I am on Centos with PHP 5.4.27 and APC 3.1.13 running

I have ben having infrequent crash problem on my site, so have to unfortunately restart PHP-FPM many times. I am still groping in dark to what could be issue. Could APC and APCu being together installed be an issue? If so, what is the correct approach?

2 Answers 2

0

You should only use APC with your PHP 5.4 installation. APC contains both user variables caching and opcode caching for PHP files.

APCu is meant to complement PHP 5.5's integrated opcode cache by adding user variables caching.

So, you should uninstall your APCu, it might cause the problems you describe.

3
  • Thnx...that helps. We have uninstalled APCu and that message is gone. But i am still not able to get away with the internal server 500 errors and frequent crashes due to unknown reasons. thnx anyways Commented Jul 7, 2014 at 3:43
  • What do the log files show about the Internal server 500 errors? Commented Jul 7, 2014 at 10:08
  • I get the following server error log: [Tue Jul 08 08:58:23 2014] [error] [client 180.76.6.138] (104)Connection reset by peer: FastCGI: comm with server "/var/www/cgi-bin/php5-fcgi" aborted: read failed [Tue Jul 08 08:58:23 2014] [error] [client 180.76.6.138] FastCGI: incomplete headers (0 bytes) received from server "/var/www/cgi-bin/php5-fcgi" Commented Jul 8, 2014 at 6:49
0

To answer further to the crash issue, Just for the benefit of the community - this is something unique which was causing havoc for me and I didn't find any instance of this situation asked or answered before in my extensive seach on this issue.

The Issue for getting frequent Internal server errors was that - I had PHP 5.4.27 and Zend Opcache was installed on my server before I migrated my new ecommerce site which used APC cache. This was causing a conflict somewhere and trhowing internal server error.

After removing Zend Opcache, Another factor was apc.include_once_override was set to '1'. It caused page distortions, I had read about this somewhere so was able to immediately pin point and set to '0'.

Now it works fine like charm !!! and I am so relieved after a month's battle.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .