ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    MySQL/PHP issue.

    IT Discussion
    6
    31
    5.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @coliver
      last edited by

      @coliver said in MySQL/PHP issue.:

      @WLS-ITGuy said in MySQL/PHP issue.:

      memory_limit = 2147483648

      Uh? We're running a fairly large instance of Moodle and limit it to ~400M.

      Have to be careful going too big or it limits the number of processes that can run and slows things way down.

      1 Reply Last reply Reply Quote 0
      • WLS-ITGuyW
        WLS-ITGuy @Obsolesce
        last edited by

        @Tim_G said in MySQL/PHP issue.:

        You can increase it in the .htaccess file for quick testing (if your config supports it).

        I don't see an .htaccess file. Site is hosted at Linode

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • WLS-ITGuyW
          WLS-ITGuy @coliver
          last edited by

          @coliver said in MySQL/PHP issue.:

          @WLS-ITGuy said in MySQL/PHP issue.:

          memory_limit = 2147483648

          Uh? We're running a fairly large instance of Moodle and limit it to ~400M.

          @scottalanmiller said in MySQL/PHP issue.:

          @coliver said in MySQL/PHP issue.:

          @WLS-ITGuy said in MySQL/PHP issue.:

          memory_limit = 2147483648

          Uh? We're running a fairly large instance of Moodle and limit it to ~400M.

          Have to be careful going too big or it limits the number of processes that can run and slows things way down.

          Changed to 400M and I still have the same issue.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @WLS-ITGuy
            last edited by

            @WLS-ITGuy said in MySQL/PHP issue.:

            @Tim_G said in MySQL/PHP issue.:

            You can increase it in the .htaccess file for quick testing (if your config supports it).

            I don't see an .htaccess file. Site is hosted at Linode

            It's a file you create 🙂

            WLS-ITGuyW 1 Reply Last reply Reply Quote 0
            • WLS-ITGuyW
              WLS-ITGuy @scottalanmiller
              last edited by

              @scottalanmiller

              That part I know, what I meant was that there wasn't one created already if that's what Tim was asking/suggesting.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @WLS-ITGuy
                last edited by

                @WLS-ITGuy said in MySQL/PHP issue.:

                @scottalanmiller

                That part I know, what I meant was that there wasn't one created already if that's what Tim was asking/suggesting.

                I thought that he was suggesting that you could create one for fast memory size testing.

                1 Reply Last reply Reply Quote 0
                • M
                  marcinozga
                  last edited by marcinozga

                  Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.

                  WLS-ITGuyW 1 Reply Last reply Reply Quote 0
                  • WLS-ITGuyW
                    WLS-ITGuy @marcinozga
                    last edited by

                    @marcinozga said in MySQL/PHP issue.:

                    Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.

                    Has been set at 2048M, restarted apache and rebooted server and still get the same error.

                    dafyreD 1 Reply Last reply Reply Quote 0
                    • dafyreD
                      dafyre @WLS-ITGuy
                      last edited by

                      @WLS-ITGuy said in MySQL/PHP issue.:

                      @marcinozga said in MySQL/PHP issue.:

                      Increase it temporarily to 2048M, or higher, and drop down once the conversion is done. Restart apache/nginx/other web server, or restart php-fpm if it's used instead after each config change.

                      Has been set at 2048M, restarted apache and rebooted server and still get the same error.

                      Is this a script that you run from the command line? You may need to edit a different php.ini file (that used to be the case -- I haven't had to do it in a while) to adjust the memory settings for the php cli.

                      1 Reply Last reply Reply Quote 0
                      • M
                        marcinozga
                        last edited by

                        Actually, you might have more than one php.ini file. Create info.php file with this content:

                        <?php phpinfo(); ?>
                        

                        and visit it in web browser. See what memory limits it shows and where could additional configs be located.

                        WLS-ITGuyW 1 Reply Last reply Reply Quote 0
                        • WLS-ITGuyW
                          WLS-ITGuy @marcinozga
                          last edited by WLS-ITGuy

                          @marcinozga said in MySQL/PHP issue.:

                          Actually, you might have more than one php.ini file. Create info.php file with this content:

                          <?php phpinfo(); ?>
                          

                          and visit it in web browser. See what memory limits it shows and where could additional configs be located.

                          http://i.imgur.com/Z9Ltyp0.png[/img]

                          http://i.imgur.com/blBpUgw.png[/img]

                          1 Reply Last reply Reply Quote 0
                          • M
                            marcinozga
                            last edited by

                            So limit is set to 2G, is the conversion script still refusing to run?

                            WLS-ITGuyW 1 Reply Last reply Reply Quote 0
                            • WLS-ITGuyW
                              WLS-ITGuy @marcinozga
                              last edited by

                              @marcinozga

                              Yes. If I CD to /var/www/moodle/ and run 'php admin/cli/mysql_compressed_rows.php --list' I get PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in var/www/moodle/admin/cli/mysql_compressed_rows.php on line 152

                              dafyreD 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                Just to be sure.... you aren't out of memory, right?

                                1 Reply Last reply Reply Quote 2
                                • M
                                  marcinozga
                                  last edited by

                                  Oh, that's a cli script, I thought you were calling it with browser. Try this:

                                  php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list
                                  
                                  WLS-ITGuyW 1 Reply Last reply Reply Quote 1
                                  • WLS-ITGuyW
                                    WLS-ITGuy @marcinozga
                                    last edited by

                                    @marcinozga said in MySQL/PHP issue.:

                                    php -d memory_limit=2048M admin/cli/mysql_compressed_rows.php --list

                                    That all worked! And now I am on to the next part of the upgrade!

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      marcinozga
                                      last edited by

                                      Just to clarify, -d option allows you to override any php settings.

                                      WLS-ITGuyW 1 Reply Last reply Reply Quote 0
                                      • WLS-ITGuyW
                                        WLS-ITGuy @marcinozga
                                        last edited by

                                        @marcinozga said in MySQL/PHP issue.:

                                        Just to clarify, -d option allows you to override any php settings.

                                        OK. So why would php.ini show that it is allowing 2G but not actually allow 2G?

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          marcinozga
                                          last edited by

                                          php-cli has its config file elsewhere, I'm not sure where. When you check it through web, it's shows what's in php.ini.

                                          WLS-ITGuyW 1 Reply Last reply Reply Quote 0
                                          • WLS-ITGuyW
                                            WLS-ITGuy @marcinozga
                                            last edited by

                                            @marcinozga
                                            Gotcha! Thanks for the help!

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post