• 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.
    • 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
                • Greg PlamondonG
                  Greg Plamondon Testers @george1421
                  last edited by

                  @george1421 said in 503 Service Unavailable Error:

                  /etc/php-fpm.d/www.conf

                  I dont have a /etc/php-fpm.d/www.conf
                  The only file in the php-fpm.d directory is fog.conf

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

                    @greg-plamondon Ok then you are using/still have my config in place. That is fine, change the line from 500 to 2000, save and restart both services. Hopefully the 500 value did address your memory exhaustion issue. This value is commented out in the FOG installed version.

                    Just make sure you don’t have two configuration files in the directory www.conf and fog.conf, you should be OK.

                    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
                    • Greg PlamondonG
                      Greg Plamondon Testers @george1421
                      last edited by

                      @george1421 said in 503 Service Unavailable Error:

                      @greg-plamondon Ok then you are using/still have my config in place. That is fine, change the line from 500 to 2000, save and restart both services. Hopefully the 500 value did address your memory exhaustion issue. This value is commented out in the FOG installed version.

                      Just make sure you don’t have two configuration files in the directory www.conf and fog.conf, you should be OK.

                      That worked, I didn’t get the 503 error that time when imaging a PC!
                      Thanks! I will submit a new ticket for my other issues…

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

                        @greg-plamondon Thank you for the feedback, please keep (ab)using the FOG server. I’m interested in the durability of the configuration over time.

                        I am interested in what Troye’s experiences with just the timeout adjustment and to see if he does run into a memory exhaustion issue. I did see one other post from the github side that ran into the memory exhaustion issue and if I remember correctly he bumped his config to 3GB and still had the issue.

                        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
                        • Greg PlamondonG
                          Greg Plamondon Testers @george1421
                          last edited by

                          @george1421 said in 503 Service Unavailable Error:

                          @greg-plamondon Thank you for the feedback, please keep (ab)using the FOG server. I’m interested in the durability of the configuration over time.

                          I am interested in what Troye’s experiences with just the timeout adjustment and to see if he does run into a memory exhaustion issue. I did see one other post from the github side that ran into the memory exhaustion issue and if I remember correctly he bumped his config to 3GB and still had the issue.

                          I am impressed with the speed of the GUI with these changes. Nice work guys keep up the good Work @george1421 @Tom-Elliott

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

                            hey, guys, none of this helped me so far. Still getting the 503 error. When I drop my database though everything works site moves faster and everything.

                            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 So just to confirm you updated the apache fog.conf file with the proxy timeout setting. Then restarted apache and still have the 503 error?

                              What errors are you seeing in the tail of the /var/log/httpd/error.log file and in /var/log/php-fpm/www-error.log file? Are you seeing a memory depletion message too? Hang in there, we’ll get this worked out.

                              @greg-plamondon php-fpm is a really powerful php processor. With new fog 1.5.1or .2 gui and php-fpm the entire fog ui should be faster than the 1.4.1 web ui, with less load on the FOG CPU.

                              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

                                This is what I have seen in the error log.

                                [12-Apr-2018 08:56:18] NOTICE: [pool fog] child 16982 exited with code 0 after 10257.570038 seconds from start
                                [12-Apr-2018 08:56:18] NOTICE: [pool fog] child 23554 started
                                [12-Apr-2018 08:56:34] NOTICE: [pool fog] child 17085 exited with code 0 after 10251.368654 seconds from start
                                [12-Apr-2018 08:56:34] NOTICE: [pool fog] child 23636 started
                                [12-Apr-2018 08:56:41] NOTICE: [pool fog] child 17076 exited with code 0 after 10264.530989 seconds from start
                                [12-Apr-2018 08:56:41] NOTICE: [pool fog] child 23690 started
                                [12-Apr-2018 08:56:43] NOTICE: [pool fog] child 17179 exited with code 0 after 10242.630129 seconds from start
                                [12-Apr-2018 08:56:43] NOTICE: [pool fog] child 23697 started
                                [12-Apr-2018 08:56:47] NOTICE: [pool fog] child 17244 exited with code 0 after 10240.578956 seconds from start
                                [12-Apr-2018 08:56:47] NOTICE: [pool fog] child 23744 started
                                [12-Apr-2018 08:56:49] NOTICE: [pool fog] child 17188 exited with code 0 after 10247.308275 seconds from start
                                [12-Apr-2018 08:56:49] NOTICE: [pool fog] child 23757 started
                                [12-Apr-2018 08:57:43] NOTICE: [pool fog] child 17395 exited with code 0 after 10275.514540 seconds from start
                                [12-Apr-2018 08:57:43] NOTICE: [pool fog] child 24055 started
                                [12-Apr-2018 09:06:14] NOTICE: [pool fog] child 20983 exited with code 0 after 10261.635580 seconds from start
                                [12-Apr-2018 09:06:14] NOTICE: [pool fog] child 27599 started
                                [12-Apr-2018 09:38:52] NOTICE: [pool fog] child 2136 exited with code 0 after 10275.005038 seconds from start
                                [12-Apr-2018 09:38:52] NOTICE: [pool fog] child 9559 started
                                [12-Apr-2018 10:10:17] NOTICE: Terminating ...
                                [12-Apr-2018 10:10:17] NOTICE: exiting, bye-bye!
                                [12-Apr-2018 10:10:54] NOTICE: fpm is running, pid 23466
                                [12-Apr-2018 10:10:54] NOTICE: ready to handle connections
                                [12-Apr-2018 10:10:54] NOTICE: systemd monitor interval set to 10000ms
                                [12-Apr-2018 10:30:26] NOTICE: Terminating ...
                                [12-Apr-2018 10:30:26] NOTICE: exiting, bye-bye!
                                [12-Apr-2018 10:31:46] NOTICE: fpm is running, pid 1007
                                [12-Apr-2018 10:31:46] NOTICE: ready to handle connections
                                [12-Apr-2018 10:31:46] NOTICE: systemd monitor interval set to 10000ms
                                [12-Apr-2018 10:32:46] WARNING: [pool fog] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 3 idle, and 19 total children```

                                Fog Server information

                                Cent OS 7
                                Running Version 1.5.2

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

                                  For others that find this thread and have the 503 error. Please post here. The developers need to understand how widespread this issue is. The default settings should be correct for all installs, but as we see here at least 2 installs has timeout issues.

                                  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
                                  • C
                                    Costas
                                    last edited by

                                    OS: Centos 7 build 1708
                                    Fog Version: 1.5 upgraded from 1.4.4

                                    Hello.
                                    Havent posted here before.
                                    Got redirected from here

                                    https://github.com/FOGProject/fogproject/issues/248

                                    I get a “HTTP ERROR 500” error when attempting to do a user tracking report.
                                    As Tom recommended on that page I did increase the memory limit in fog setting up to 4GB before I gave up as the error would still not go away.
                                    This happens whether you search for a user or hostname.
                                    I tried a few other reports such as snapin log report and history log report and they seem to be working fine.
                                    Let me know if i need to provide anything else.

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

                                      @costas Will you reset the memory limits back to FOG’s default value.

                                      Then lets inspect /var/log/php-fpm/www-error.log for a memory exhaustion warning message like Greg’s below. If that is found then lets make the adjustment that appears to have fixed Greg’s issue.

                                      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

                                      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!

                                      C 1 Reply Last reply Reply Quote 0
                                      • C
                                        Costas @george1421
                                        last edited by

                                        @george1421 Hey George.
                                        My www-error.log is not very useful.
                                        Only has one line in it.
                                        “[15-Apr-2018 03:45:01] NOTICE: error log file re-opened”
                                        just to be cleat the error I get when running a user tracking report in chrome is
                                        “This page isn’t working
                                        10.214.14.27 is currently unable to handle this request.
                                        HTTP ERROR 500”
                                        should i still go ahead and perform the changes you asked for?

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          Daniel Miller
                                          last edited by

                                          Don’t know if this relevant to this issue (if not, let me know and I"ll open another thread), but I’m encountering http 500 responses on the user tracking report page with similar log entries on an ubuntu based system I just upgraded from 1.4.4 to 1.5.2 from a git pull off an existing checkout.

                                          After changing the the pm.max_request setting in /etc/php/7.1/fpm/pool.d/www.conf and changing the memory limit to 2048 (the box only has 2GB), I see a warning about the server reaching the pm.max_children value in /var/log/php7.1-fpm.log followed by a proxy_fcgi:error in /var/log/apache2/error.log citing an out of memory condition in fogcontroller.class.php with referrer /fog/management/index.php?node=report&sub=file&f=dXNlciB0cmFja2luZw==. There is a reference to a line number for the oom error that seems to vary between lines 126 (in __construct()) and 260 (in set()), but I would expect that depends on when it actually ran out. I enabled error reporting in the php settings for apache, but it doesn’t seem to want to get past the 500.

                                          Raising the max_children to 20 shows entries in php7.1-fpm.log about the pool seeming busy and it spawning additional children until the limit is reached then it reports the reaching of the max_children limit again. The proxy_fcgi:error in this case is a timeout dispatching a request to (polling) with the same referrer.

                                          Scaling the memory limit back down to default results in a reference to pdodb.class.php line 602 in the memory exhaustion message.

                                          I also attempted altering the apache configuration, but I only had to add the ProxySet timeout. No change in the error message.

                                          Happy to poke at anything else you might have an idea about. Have a few days before I need to decide to backrev or not.

                                          george1421G Tom ElliottT 2 Replies Last reply Reply Quote 0
                                          • george1421G
                                            george1421 Moderator @Daniel Miller
                                            last edited by

                                            @daniel-miller How many fog clients do you have in your environment?

                                            You shouldn’t need to change the memory limit in pgp-fpm the pm.max_requests at 2000 should address the issue.

                                            Now your fog server having only 2GB of memory may be amplifying the issue. If you run the top command how much free memory do you have?

                                            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!

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

                                            151

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project