Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-385

Windows packages for download don't specify which versions of apache, mysql, php etc they use and suffer from memory leaks

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: download.moodle.org
    • Labels:
      None

      Description

      Having gotten my production site running on XAMPP a few months ago (its fine - you just have to tune mysql settings), I have noticed the dreaded Apache/windows memory leak. The forums suggest that certain combinations of apache/mysql/php are stable, but the package I downloaded, with apache 2.2.3, mysql 5.0.27 and php 5.2.0 doesn't seem to be one of them.

      600MB with no active connections during a quiet period is definitely not right.

      The packages should reflect the info from the forums e.g. http://moodle.org/mod/forum/discuss.php?d=89143

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi Matt,

            thanks for the info. Looking the XAMPP site, it seems that the latest available package is:

            XAMPP Lite 1.6.6a - with Apache 2.2.8 + PHP 5.2.5 + MySQL 5.0.51a
            ( http://www.apachefriends.org/en/xampp-windows.html#646 )

            Do you think it's a better combination? If so, I can try to upgrade all Windows packages in a couple of days.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi Matt, thanks for the info. Looking the XAMPP site, it seems that the latest available package is: XAMPP Lite 1.6.6a - with Apache 2.2.8 + PHP 5.2.5 + MySQL 5.0.51a ( http://www.apachefriends.org/en/xampp-windows.html#646 ) Do you think it's a better combination? If so, I can try to upgrade all Windows packages in a couple of days. Ciao
            Hide
            mattgibson Matt Gibson added a comment -

            I've just been googling and have not been able to find out whether this is more stable or not. On the basis of knowing for sure that the current version is broken and that upgrades sometimes fix things, I would love it if you could update the packages, which I will be happy to test

            I found this site whilst searching that details a recent workaround and suggests that it may be certain modules causing the problem:
            http://www.davidwesterfield.net/index.php?entry=entry080303-115041

            Show
            mattgibson Matt Gibson added a comment - I've just been googling and have not been able to find out whether this is more stable or not. On the basis of knowing for sure that the current version is broken and that upgrades sometimes fix things, I would love it if you could update the packages, which I will be happy to test I found this site whilst searching that details a recent workaround and suggests that it may be certain modules causing the problem: http://www.davidwesterfield.net/index.php?entry=entry080303-115041
            Hide
            mattgibson Matt Gibson added a comment -

            That solution failed. http://moodle.org/mod/forum/discuss.php?d=90022#p412059

            http://www.apachelounge.com/download/ Seems like a better solution than xampp as its optimised for windows including memory leak fixes. Would that be harder to use, or no different?

            Show
            mattgibson Matt Gibson added a comment - That solution failed. http://moodle.org/mod/forum/discuss.php?d=90022#p412059 http://www.apachelounge.com/download/ Seems like a better solution than xampp as its optimised for windows including memory leak fixes. Would that be harder to use, or no different?
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Problem with apachelounge, AFAIK is that it's only apache (no mysql bundled in the same package). And we need both.

            Anyway, I'll try to rebuild packages ASAP to use the latest XAMPP release available (I'm only some bugs away to arrive here).

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Problem with apachelounge, AFAIK is that it's only apache (no mysql bundled in the same package). And we need both. Anyway, I'll try to rebuild packages ASAP to use the latest XAMPP release available (I'm only some bugs away to arrive here). Ciao
            Hide
            mattgibson Matt Gibson added a comment -

            http://moodle.org/mod/forum/discuss.php?d=93358

            Seems like apache lounge works well.

            Show
            mattgibson Matt Gibson added a comment - http://moodle.org/mod/forum/discuss.php?d=93358 Seems like apache lounge works well.
            Hide
            mattgibson Matt Gibson added a comment -

            From what I can tell, apache lounge use the same method of running the executable without installing it, so after php5 and mod_never_expires are added, it should be possible to just drop it into the XAMPP folder to replace the existing apache. Testing this now...

            Show
            mattgibson Matt Gibson added a comment - From what I can tell, apache lounge use the same method of running the executable without installing it, so after php5 and mod_never_expires are added, it should be possible to just drop it into the XAMPP folder to replace the existing apache. Testing this now...
            Hide
            mattgibson Matt Gibson added a comment -

            mod_php5 says: "Runs only with PHP 5.1.0-5.1.6 and Apache 2.2.x
            " whereas XAMPP uses 5.2.5. Need to downgrade.

            Show
            mattgibson Matt Gibson added a comment - mod_php5 says: "Runs only with PHP 5.1.0-5.1.6 and Apache 2.2.x " whereas XAMPP uses 5.2.5. Need to downgrade.
            Hide
            mattgibson Matt Gibson added a comment -

            Oops, my bad. It only needs a special version of the php5 dll for php versions lower than php 5.2.x.

            I have now dropped the apachelounge distribution directly into my xampp folder as follows:

            1. download and install the Visual C++ 2008 Redistributable Package from www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

            2. unzip the apachelounge package (Apache2 folder) and place it into the XAMPP directory

            3. alter paths in the /conf/httpd.conf file so that server root, document root and the CGI paths are how they should be (varies according to where you have installed XAMPP)

            4. Add the following lines to httpd.conf:

            LoadModule php5_module "c:/path-to-php/php5apache2.dll"

            AddType application/x-httpd-php .php

            1. configure the path to php.ini - you may have been using the one in /apache/bin, so make
            2. sure the copy you want is in the right place

            PHPIniDir "C:/path-to-php"

            5. Save httpd.conf

            6. copy libmysql.dll and ntwdblib.dll from the old apache/bin folder to the new Apache2/bin folder

            test.

            Show
            mattgibson Matt Gibson added a comment - Oops, my bad. It only needs a special version of the php5 dll for php versions lower than php 5.2.x. I have now dropped the apachelounge distribution directly into my xampp folder as follows: 1. download and install the Visual C++ 2008 Redistributable Package from www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en 2. unzip the apachelounge package (Apache2 folder) and place it into the XAMPP directory 3. alter paths in the /conf/httpd.conf file so that server root, document root and the CGI paths are how they should be (varies according to where you have installed XAMPP) 4. Add the following lines to httpd.conf: LoadModule php5_module "c:/path-to-php/php5apache2.dll" AddType application/x-httpd-php .php configure the path to php.ini - you may have been using the one in /apache/bin, so make sure the copy you want is in the right place PHPIniDir "C:/path-to-php" 5. Save httpd.conf 6. copy libmysql.dll and ntwdblib.dll from the old apache/bin folder to the new Apache2/bin folder test.
            Hide
            mattgibson Matt Gibson added a comment -

            Apache is running at 25MB at rest now and releases memory as it should. I think this is the way to go.

            Show
            mattgibson Matt Gibson added a comment - Apache is running at 25MB at rest now and releases memory as it should. I think this is the way to go.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Great research, Matt! Thanks!

            I'm going to update Win packages to the latest XAMPP available at fist term. If that doesn't fix the memory problem (has anybody tested that?) we'll need to try your alternative. Just thinking it requires that "extra" download from MS making the package not 100% self-contained, grrr.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Great research, Matt! Thanks! I'm going to update Win packages to the latest XAMPP available at fist term. If that doesn't fix the memory problem (has anybody tested that?) we'll need to try your alternative. Just thinking it requires that "extra" download from MS making the package not 100% self-contained, grrr. Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi,

            I've updated packages to use XAMPP Lite 1.6.6a - with Apache 2.2.8 + PHP 5.2.5 + MySQL 5.0.51a

            initial tests here point to 21-23 MB, releasing after each request. I only have had it running 1 hour.

            Packages are being rebuilt right now... so in some minutes they'll be available at:

            http://download.moodle.org/windows

            Any feedback about memory usage will be really welcome. It's the key to see if we need to switch to other alternatives like the one exposed by Matt above.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi, I've updated packages to use XAMPP Lite 1.6.6a - with Apache 2.2.8 + PHP 5.2.5 + MySQL 5.0.51a initial tests here point to 21-23 MB, releasing after each request. I only have had it running 1 hour. Packages are being rebuilt right now... so in some minutes they'll be available at: http://download.moodle.org/windows Any feedback about memory usage will be really welcome. It's the key to see if we need to switch to other alternatives like the one exposed by Matt above. TIA and ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Closing this as current versions seems to be free of leaks... though we'll have to upgrade soon to a newer package using PHP 5.2.8, mainly due to Moodle 2.0 requirements.

            Versions are specified in the first page of installation.

            Please, create a new bug if necessary. Thanks a ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Closing this as current versions seems to be free of leaks... though we'll have to upgrade soon to a newer package using PHP 5.2.8, mainly due to Moodle 2.0 requirements. Versions are specified in the first page of installation. Please, create a new bug if necessary. Thanks a ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Linked with MDLSITE-627 where the upgrade of XAMPP will happen.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Linked with MDLSITE-627 where the upgrade of XAMPP will happen.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development