logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Errors after installation of eAccelerator
Author
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Sat 23 Aug '08 10:13    Post subject: Errors after installation of eAccelerator Reply with quote

Hello all,

I installed eAccelerator (from here) after using APC for some time. APC was causing http 500 errors for some odd reason. The removal of APC eliminated those errors, so I tried eAccelerator.

After about a day I got a ping that one of my sites was down last night at 4am. I saw a bunch of 'out of memory errors' in the error.log, so I increased the amount of VM to W2k3 and doubled the amount of memory in php.ini to see if the problem disappeared. It did not, as I have the errors again. At least this time Apache was restarting and clearing out the memory. I've disabled eAcelerator for now.

Code:
[Fri Aug 22 11:05:54 2008] [error] [client x.x.x.x] PHP Fatal error:  Out of memory (allocated 1310720) (tried to allocate 393216 bytes) in D:\\htdocs\\site1\\forums\\includes\\functions.php(2836) : eval()'d code on line 223, referer: http://www.site1.com/forums/forumdisplay.php?f=2
[Fri Aug 22 11:05:55 2008] [error] [client x.x.x.x] PHP Fatal error:  Out of memory (allocated 1835008) (tried to allocate 393216 bytes) in D:\\htdocs\\site1\\forums\\includes\\functions.php(2836) : eval()'d code on line 223, referer: http://www.site1.com/newthread.php?do=newthread&f=2
[Fri Aug 22 11:05:55 2008] [error] [client x.x.x.x] PHP Fatal error:  Out of memory (allocated 1835008) (tried to allocate 393216 bytes) in D:\\htdocs\\site1\\forums\\includes\\functions.php(2836) : eval()'d code on line 223, referer: http://www.site1.com/forums/newreply.php?t=1601
[Fri Aug 22 11:05:56 2008] [error] [client x.x.x.x] script 'D:/htdocs/site1/forumdisplay.php' not found or unable to stat, referer: http://www.site1.com/forumdisplay.php?f=1
[Fri Aug 22 11:05:56 2008] [error] [client x.x.x.x] PHP Fatal error:  Out of memory (allocated 1310720) (tried to allocate 262142 bytes) in D:\\htdocs\\site2\\dmforums\\forumdisplay.php(957) : eval()'d code on line 80
zend_mm_heap corrupted
[Fri Aug 22 11:06:02 2008] [notice] Parent: child process exited with status 1 -- Restarting.
[Fri Aug 22 11:06:08 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Fri Aug 22 11:06:08 2008] [notice] Server built: Mar  8 2008 14:15:40
[Fri Aug 22 11:06:08 2008] [notice] Parent: Created child process 5092
[Fri Aug 22 11:06:08 2008] [notice] Disabled use of AcceptEx() WinSock2 API
[Fri Aug 22 11:06:09 2008] [notice] Child 5092: Child process is running
[Fri Aug 22 11:06:09 2008] [notice] Child 5092: Acquired the start mutex.
[Fri Aug 22 11:06:09 2008] [notice] Child 5092: Starting 500 worker threads.
[Fri Aug 22 11:06:09 2008] [notice] Child 5092: Listening on port 80.


Using Steffen's recommended settings. Apache 2.2.8/PHP 5.2.6/W2k3

Any suggestions?
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Sun 24 Aug '08 15:12    Post subject: Reply with quote

Ok, either the solution is so obvious or the problem so unique as no one is bothering to reply. Confused
Back to top
ezard



Joined: 23 Aug 2008
Posts: 2
Location: brasil

PostPosted: Sun 24 Aug '08 17:21    Post subject: Reply with quote

im new in these,but since the problem since to be out of memory
try to increase the memory in php.ini.
hope that this can help
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Mon 25 Aug '08 9:44    Post subject: Reply with quote

I did that. Problem remained. Sad
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 25 Aug '08 10:04    Post subject: Reply with quote

I had that problem with some PHP extensions. Please disable all extensions in php.ini you do not need.
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Mon 25 Aug '08 21:10    Post subject: Reply with quote

This only occurs if eAccelerator is enabled.

If no opcode cash enabled, these errors don't exist.

I tried xcache, same problem after some usage.

I am not sure what is running out of memory. Cache limit was set to 64. PHP memory_limit is 128M. System has free memory.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Aug '08 1:10    Post subject: Reply with quote

For testing disable all extensions in your php.ini, but eAccelerator. Set memory_limit to 512M
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Tue 26 Aug '08 14:12    Post subject: Reply with quote

Thanks for the reply. I'd love to disable all extensions but eAccelerator or xcache, however then my websites won't run. Sad The only extensions enabled are the mysql, gd2, and curl extensions. Shall I re-enable eAccelerator and set the memory limit to 512M regardless?

Code:

;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
;extension = php_apc.dll

;extension="eaccelerator.dll"
;eaccelerator.allowed_admin_path="d:\htdocs"
;eaccelerator.shm_size="64"
;eaccelerator.cache_dir="c:\windows\temp\"
;eaccelerator.enable="1"
;eaccelerator.optimizer="1"
;eaccelerator.check_mtime="0"
;eaccelerator.debug="0"
;eaccelerator.filter=""
;eaccelerator.shm_max="0"
;eaccelerator.shm_ttl="0"
;eaccelerator.shm_prune_period="0"
;eaccelerator.shm_only="1"
;eaccelerator.compress="0"
;eaccelerator.compress_level="9"
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Aug '08 16:49    Post subject: Reply with quote

I tested it under the same settings on Win2k3 standart edition without problems. The only difference is that I use apache 2.2.9
I can not reproduce your error. It is a bit wired that also xcache chrashes.
Very strange error is zend_mm_heap.

You may try reinstall PHP with a fresh download from php.net and start over.
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Wed 27 Aug '08 1:52    Post subject: Reply with quote

Thanks again for your reply. I did recently update from PHP 5.2.5 to 5.2.6. How much RAM to you have in your 2k3 box? Mine had 1 GB and I'm wondering if I'm just simply running out of physical RAM. It should just start using virtual memory (not that this scenario is preferable), however things don't always work as desired.

The reason I started using eAccelerator was APC would throw http 500 errors. Something tells me the root cause is the same in all three cases.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 27 Aug '08 12:29    Post subject: Reply with quote

I have 1 GB RAM into mybox. I disabled the swap file, so all applications runs in real RAM. I tried APC, but it did not refresh its internal cache as I needed, so some scripts did not work correcly.
Is eaccelerator running now on your box?
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Thu 28 Aug '08 22:22    Post subject: Reply with quote

No, I have no caching running at the moment. The machine usually has about ~!00MB of free physical RAM at any given time. The httpd process takes about ~400MB and mysql about ~150MB, the bulk of the RAM.

How much free RAM do you typically have?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 29 Aug '08 12:47    Post subject: Reply with quote

I had a long time about 500MB usage for httpd. Than I changed PHP to fcgid and it went down to ~150 MB. PHP Processes still grow sometime to 300 MB, but over the fcgid PHP dies and frees memory.
A second thing was turning on mod_deflate that safed memory. Ok the cpu is a bit more busy, but ths size of serving files is less for the hole system.
At leased there is 360 MB free memory on heavy usage. The slowed part of my server is the harddisk.
Back to top
solinem



Joined: 15 Sep 2008
Posts: 1
Location: Mexico City

PostPosted: Wed 17 Sep '08 17:37    Post subject: It seems nobody knows what's happening Reply with quote

I have a twin quad-core server with 8 GB of ram and have the same problem, so, I think the problem does not have to do anything with the memory in the server but in the resources assigned to apache.
I have assigned 1GB to it and the problem persists. I even set the value to -1 (to disable memory control), but the server is still running out of memory.
Back to top
djc



Joined: 04 Dec 2007
Posts: 37

PostPosted: Thu 16 Oct '08 3:28    Post subject: Reply with quote

The problem seems to have solved.

The system was simply running out of memory and reverting to virtual memory. Having only 1 GB in the system, I found issues with my MySQL config that was eating up memory. I freed up about 150MB and the problem hasn't duplicated itself.

APC runs fine. I haven't tried eaccelerator or xcache.
Back to top


Reply to topic   Topic: Errors after installation of eAccelerator View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules