• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    503 Service Unavailable Error

    Scheduled Pinned Locked Moved
    FOG Problems
    10
    67
    28.5k
    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.
    • T
      Troye Johnson
      last edited by

      here is some information I got from the error.log

      [10-Apr-2018 12:36:06] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 2 idle, and 11 total children
      [10-Apr-2018 12:36:07] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 3 idle, and 14 total children
      [10-Apr-2018 12:36:08] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 4 idle, and 16 total children
      [10-Apr-2018 12:36:09] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 4 idle, and 17 total children
      [11-Apr-2018 13:21:32] NOTICE: Terminating …
      [11-Apr-2018 13:21:32] NOTICE: exiting, bye-bye!
      [11-Apr-2018 13:23:53] NOTICE: fpm is running, pid 3560
      [11-Apr-2018 13:23:53] NOTICE: ready to handle connections
      [11-Apr-2018 13:23:53] NOTICE: systemd monitor interval set to 10000ms
      [11-Apr-2018 13:32:55] NOTICE: Terminating …
      [11-Apr-2018 13:32:55] NOTICE: exiting, bye-bye!
      [11-Apr-2018 13:33:36] NOTICE: fpm is running, pid 969
      [11-Apr-2018 13:33:36] NOTICE: ready to handle connections
      [11-Apr-2018 13:33:36] NOTICE: systemd monitor interval set to 10000ms

      Fog Server information

      Cent OS 7
      Running Version 1.5.2

      T 1 Reply Last reply Reply Quote 0
      • T
        Troye Johnson @Troye Johnson
        last edited by

        @troye-johnson

        [10-Apr-2018 13:41:10 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 383
        [10-Apr-2018 13:41:12 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 400
        [10-Apr-2018 14:07:13 UTC] PHP Warning:  Error while sending QUERY packet. PID=3131 in /var/www/html/fog/lib/db/pdodb.class.php on line 591
        [10-Apr-2018 14:07:13 UTC] PHP Warning:  array_combine(): Both parameters should have an equal number of elements in /var/www/html/fog/lib/fog/fogbase.class.php on line 1095
        [10-Apr-2018 14:07:14 UTC] PHP Warning:  Error while sending QUERY packet. PID=1228 in /var/www/html/fog/lib/db/pdodb.class.php on line 591
        [10-Apr-2018 14:08:08 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 383
        [10-Apr-2018 14:08:09 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 400
        [11-Apr-2018 07:13:07 UTC] PHP Warning:  array_map(): An error occurred while invoking the map callback in /var/www/html/fog/lib/fog/fogpagemanager.class.php on line 386
        [11-Apr-2018 07:13:07 UTC] PHP Fatal error:  Uncaught exception 'Exception' with message '#!im' in /var/www/html/fog/lib/fog/fogbase.class.php:584
        Stack trace:
        #0 /var/www/html/fog/lib/client/registerclient.class.php(47): FOGBase::getHostItem(true, false, false, true)
        #1 /var/www/html/fog/lib/fog/fogpage.class.php(3008): RegisterClient->json()
        #2 /var/www/html/fog/lib/fog/fogpage.class.php(249): FOGPage->requestClientInfo()
        #3 /var/www/html/fog/lib/pages/processlogin.class.php(57): FOGPage->__construct('')
        #4 /var/www/html/fog/lib/fog/fogpagemanager.class.php(381): ProcessLogin->__construct()
        #5 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')
        #6 /var/www/html/fog/lib/fog/fogpagemanager.class.php(386): array_map(Object(Closure), Array)
        #7 /var/www/html/fog/lib/fog/fogpagemanager.class.php(79): FOGPageManager->loadPageClasses()
        #8 [internal function]: FOGPageManager->__construct()
        #9 /var/www/html/fog/lib/fog/fogbase.class.php(481): ReflectionClass->newInstanceArgs(Array)
        #10 /var/www/html/fog/management/index.php(23): FOGBase::getCla in /var/www/html/fog/lib/fog/fogbase.class.php on line 584
        [11-Apr-2018 17:24:03 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 383
        [11-Apr-2018 17:24:06 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/fog/lib/db/mysqldump.class.php on line 400
        [11-Apr-2018 19:00:56 UTC] PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/info.php on line 5
        
        

        Fog Server information

        Cent OS 7
        Running Version 1.5.2

        george1421G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @Tom Elliott
          last edited by

          @tom-elliott said in 503 Service Unavailable Error:

          @george1421 change the memory limit it fogsettings

          I’m just trying to understand where its getting the 134MB value from. PHP-FPM should read the php.ini for the memory limit (which is 128MB) unless it is overridden in its own config file (which is commented out at the moment).

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • T
            Troye Johnson
            last edited by

            I still can not get the web page to work.

            how would I go about changing the memory limit in the fog settings if I cannot get to the settings page?

            Fog Server information

            Cent OS 7
            Running Version 1.5.2

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Troye Johnson
              last edited by

              @troye-johnson I’m not so concerned about the timezone messages, but the rest of them look pretty interesting. Your issue doesn’t seem to be a memory issue as with Greg’s. Your’s looks a bit more troubling.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Troye Johnson
                last edited by

                @troye-johnson its in /etc/php.ini search for memory

                The value looks like this:

                memory_limit = 128M
                

                Change it to 256M save it then reboot the fog server. I really don’t think your issue is memory since the log file doesn’t say anything about memory exhaustion.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Greg Plamondon
                  last edited by

                  @greg-plamondon Greg, if you still have memory exhaustion issues with my config I want you to change the memory allocation in the www.conf file. We need you guys to help us debug this issue.

                  I’m not getting a clear answer (my google-fu is weak today) on if php-fpm looks at the php.ini config file for its memory settings, or uses its own.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott
                    last edited by

                    The fog settings overrides the php ini setting. So you can set whatever you want in the php.ini, but the fog settings overrides it. This is intentional. This way you can limit when memory usage should be expanded to only usage on fog.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    george1421G 1 Reply Last reply Reply Quote 0
                    • T
                      Troye Johnson
                      last edited by

                      changing the limit did not help still getting the 503 error.

                      Fog Server information

                      Cent OS 7
                      Running Version 1.5.2

                      1 Reply Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott
                        last edited by

                        https://forums.fogproject.org/topic/10717/can-php-fpm-make-fog-web-gui-fast/3

                        Please try following this in regards to your 503 error.

                        The memory limit wouldn’t play an impact on the 503, it’d most likely do a 500 as it would crash.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        T 1 Reply Last reply Reply Quote 0
                        • Greg PlamondonG
                          Greg Plamondon Testers
                          last edited by

                          ok, I thought it was fixed for me but I still get the 503 when doploying an image.
                          If i refresh and look in tasks the task was created.

                          here is my httpd error.log

                          [Wed Apr 11 15:44:33.208616 2018] [proxy_fcgi:error] [pid 31003:tid 140654097147648] (70007)The timeout specified has expired: [client 192.168.10.170:50376] AH01075: Error dispatching request to :, referer: http://10fogserver.mtstrans.com/fog/management/index.php?node=host&sub=deploy&id=698&type=1
                          

                          I dont want to Hijack @Troye-Johnson thread… Should a create a new one?

                          george1421G 1 Reply Last reply Reply Quote 0
                          • george1421G
                            george1421 Moderator @Tom Elliott
                            last edited by

                            @tom-elliott said in 503 Service Unavailable Error:

                            The fog settings overrides the php ini setting.

                            This probably should be taken off line, but if I understand correctly php-fpm may not look or even care about the memory limts set on php. It may only pay attention to its own settings. I need do some more research tonight to see if I can get php-fpm to spit out its settings like we can do for …

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                            1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @Greg Plamondon
                              last edited by george1421

                              @greg-plamondon what does /var/log/php-fpm/www-error.log say? I’m not seeing just yet what is causing the 503 error.

                              I don’t know if its apache not waiting for php-fpm to finish or php-fpm timing out before its able to deploy the image.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                              Greg PlamondonG 1 Reply Last reply Reply Quote 0
                              • T
                                Troye Johnson @Tom Elliott
                                last edited by

                                @tom-elliott

                                I am getting dependency errors when trying to do “yum install php-pecl-memcache”

                                0_1523476419690_6a9ec49f-73c5-4c01-90b2-1d20767cbc3a-image.png

                                Fog Server information

                                Cent OS 7
                                Running Version 1.5.2

                                1 Reply Last reply Reply Quote 0
                                • Greg PlamondonG
                                  Greg Plamondon Testers @george1421
                                  last edited by

                                  @george1421 said in 503 Service Unavailable Error:

                                  /var/log/php-fpm/www-error.log

                                  There are no new entries in /var/log/php-fpm/www-error.log

                                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                                  • Tom ElliottT
                                    Tom Elliott @Greg Plamondon
                                    last edited by

                                    @greg-plamondon You said your 503 stuff went away after following the guide? Is this true, or the 503 returned?

                                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                    Greg PlamondonG 1 Reply Last reply Reply Quote 0
                                    • Greg PlamondonG
                                      Greg Plamondon Testers @Tom Elliott
                                      last edited by

                                      @tom-elliott said in 503 Service Unavailable Error:

                                      @greg-plamondon You said your 503 stuff went away after following the guide? Is this true, or the 503 returned?

                                      it went away for the most part, now I only get it when deploying an image.

                                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                                      • Tom ElliottT
                                        Tom Elliott @Greg Plamondon
                                        last edited by

                                        @greg-plamondon Can you grab a video or pic of the error as it’s trying to get into a deploy task?

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                        Greg PlamondonG 1 Reply Last reply Reply Quote 0
                                        • Greg PlamondonG
                                          Greg Plamondon Testers @Tom Elliott
                                          last edited by

                                          @tom-elliott said in 503 Service Unavailable Error:

                                          @greg-plamondon Can you grab a video or pic of the error as it’s trying to get into a deploy task?
                                          Sure thing:
                                          alt text

                                          george1421G 1 Reply Last reply Reply Quote 0
                                          • george1421G
                                            george1421 Moderator @Greg Plamondon
                                            last edited by george1421

                                            @greg-plamondon I spent a few hours working on this issue last night. I’m proud to report I can’t duplicate this error. That doesn’t really mean a hill of beans here. That just means my environment is a bit different than yours. My dev box only has a handful of clients and is on a pretty fast server. I do have a few ideas that I would like you guys to test. We do need php-fpm to work well to help improve web ui performance. The UI Developers are working on an optimized version of the new ui for 1.6.0 release, but that is a few months out yet.

                                            What I would like both of you to do is:

                                            1. Rerun the fog installer to reset everything back to a known configuration (hopefully).
                                            2. Once the installer has completed I want both of you to modify the following file: /etc/httpd/conf.d/fog.conf
                                            3. Insert the following section:
                                                <Proxy "fcgi://127.0.0.1:9000">
                                                    ProxySet timeout=300
                                                </Proxy>
                                            
                                            1. To make the file look like this:
                                            <VirtualHost *:80>
                                                <Proxy "fcgi://127.0.0.1:9000">
                                                    ProxySet timeout=300
                                                </Proxy>
                                                <FilesMatch "\.php$">
                                                    SetHandler "proxy:fcgi://127.0.0.1:9000/"
                                                </FilesMatch>
                                                KeepAlive Off
                                                ServerName 192.168.100.1
                                                DocumentRoot /var/www/html/
                                                RewriteEngine On
                                                RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
                                                RewriteRule .* - [F]
                                                <Directory /var/www/html/fog/>
                                                    DirectoryIndex index.php index.html index.htm
                                                    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
                                                    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
                                                    RewriteRule ^/(.*)$ /fog/api/index.php [QSA,L]
                                                </Directory>
                                            </VirtualHost>
                                            
                                            1. Save and exit the editor
                                            2. Issue the following command to restart apache:
                                              systemctl restart httpd

                                            This directive should tell apache to wait up to 5 minutes for php-fpm to complete its operations. (if it takes that long there is something else really wrong)

                                            Now Greg, since you had a memory exhaustion issue I want you to do these additional setup.

                                            1. Edit this file /etc/php-fpm.d/www.conf
                                            2. Look for a line that reads:
                                              ;pm.max_requests = 500
                                            3. Uncomment that line and change the parameter to 2000 to make it look like this:
                                              pm.max_requests = 2000
                                            4. Save and exit the editor.
                                            5. Restart php-fpm and apache.
                                              systemctl restart php-fpm
                                              systemctl restart httpd

                                            I think we actually have 2 issues here, and they are both relevant. Both are hitting the timeout issue, while Greg is hitting the next issue too.

                                            Thank you guys for helping to work this out. I’m pretty sure we can get a resolution, if not we can always make 2 changes to apache and be back to the way 1.5.1 and earlier worked using the built in apache php engine.

                                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                            Greg PlamondonG 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post

                                            156

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project