atomic deployments with Nginx and PHP FPM The 2019 Stack Overflow Developer Survey Results Are InBlank Page: wordpress on nginx+php-fpmnginx not able to connect to php-fpm socketchrooting php-fpm with nginxA complicated nginx/php-fpm chroot setupNginx php-fpm pool being blocked and stop respondingnginx php5-fpm path_info urls and root locationNGINX don't parse .php5 as .phpnginx and php-fpm permissionnginx and php-fpm “Primary script unknown”What's the Relationship Between an nginx worker_process and PHP-FPM

One word riddle: Vowel in the middle

What is the closest word meaning "respect for time / mindful"

What does ひと匙 mean in this manga and has it been used colloquially?

What do the Banks children have against barley water?

Does the shape of a die affect the probability of a number being rolled?

A poker game description that does not feel gimmicky

How technical should a Scrum Master be to effectively remove impediments?

Is an up-to-date browser secure on an out-of-date OS?

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

Which Sci-Fi work first showed weapon of galactic-scale mass destruction?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Did Section 31 appear in Star Trek: The Next Generation?

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Shouldn't "much" here be used instead of "more"?

Time travel alters history but people keep saying nothing's changed

Are there incongruent pythagorean triangles with the same perimeter and same area?

Origin of "cooter" meaning "vagina"

Aging parents with no investments

Where to refill my bottle in India?

Is bread bad for ducks?

FPGA - DIY Programming

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Are there any other methods to apply to solving simultaneous equations?

Why is the maximum length of OpenWrt’s root password 8 characters?



atomic deployments with Nginx and PHP FPM



The 2019 Stack Overflow Developer Survey Results Are InBlank Page: wordpress on nginx+php-fpmnginx not able to connect to php-fpm socketchrooting php-fpm with nginxA complicated nginx/php-fpm chroot setupNginx php-fpm pool being blocked and stop respondingnginx php5-fpm path_info urls and root locationNGINX don't parse .php5 as .phpnginx and php-fpm permissionnginx and php-fpm “Primary script unknown”What's the Relationship Between an nginx worker_process and PHP-FPM



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm trying to get atomic deployments, I don't want to lose/drop any requests.



I deploy the code using Capistrano, classic situation were you have a 'current' dir that is a symlink to
the latest release in the 'release' folder.
I'm using Nginx, PHP 5.5 FPM with Opcache.
Following the idea of just using $realpath_root in Nginx I'm expecting that a simple nginx reload would suffice, but it's not.
With nginx reload it seems that I'm not losing any requests but php-fpm is still executing the code from the previous old dir.
If I do a 'php-fpm reload' then php fpm is reading from the new dir but I can still see that I'm losing some requests:




'recv() failed (104: Connection reset by peer) while reading response header from upstream'




The question is: should I reload PHP FPM or not?



From what I understand nginx is passing the path to php-fpm and from the nginx debug log I can see that the path passed is the right one but php-fpm still executes the old one.



2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/current/web"
2014/09/23 17:13:22 [debug] 26234#0: *1742 posix_memalign: 00000000010517A0:4096 @16
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "SCRIPT_FILENAME"
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/ive/releases/20140923124417/web"
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/app.php"
2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "SCRIPT_FILENAME: /shop/www/htdocs/live/releases/20140923124417/web/app.php"
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "DOCUMENT_ROOT"
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/live/releases/20140923124417/web"
2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "DOCUMENT_ROOT: /shop/www/htdocs/live/releases/20140923124417/web"
2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "APPLICATION_ENV"


What am I missing? thanks










share|improve this question






























    1















    I'm trying to get atomic deployments, I don't want to lose/drop any requests.



    I deploy the code using Capistrano, classic situation were you have a 'current' dir that is a symlink to
    the latest release in the 'release' folder.
    I'm using Nginx, PHP 5.5 FPM with Opcache.
    Following the idea of just using $realpath_root in Nginx I'm expecting that a simple nginx reload would suffice, but it's not.
    With nginx reload it seems that I'm not losing any requests but php-fpm is still executing the code from the previous old dir.
    If I do a 'php-fpm reload' then php fpm is reading from the new dir but I can still see that I'm losing some requests:




    'recv() failed (104: Connection reset by peer) while reading response header from upstream'




    The question is: should I reload PHP FPM or not?



    From what I understand nginx is passing the path to php-fpm and from the nginx debug log I can see that the path passed is the right one but php-fpm still executes the old one.



    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/current/web"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 posix_memalign: 00000000010517A0:4096 @16
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "SCRIPT_FILENAME"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/ive/releases/20140923124417/web"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/app.php"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "SCRIPT_FILENAME: /shop/www/htdocs/live/releases/20140923124417/web/app.php"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "DOCUMENT_ROOT"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/live/releases/20140923124417/web"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "DOCUMENT_ROOT: /shop/www/htdocs/live/releases/20140923124417/web"
    2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "APPLICATION_ENV"


    What am I missing? thanks










    share|improve this question


























      1












      1








      1








      I'm trying to get atomic deployments, I don't want to lose/drop any requests.



      I deploy the code using Capistrano, classic situation were you have a 'current' dir that is a symlink to
      the latest release in the 'release' folder.
      I'm using Nginx, PHP 5.5 FPM with Opcache.
      Following the idea of just using $realpath_root in Nginx I'm expecting that a simple nginx reload would suffice, but it's not.
      With nginx reload it seems that I'm not losing any requests but php-fpm is still executing the code from the previous old dir.
      If I do a 'php-fpm reload' then php fpm is reading from the new dir but I can still see that I'm losing some requests:




      'recv() failed (104: Connection reset by peer) while reading response header from upstream'




      The question is: should I reload PHP FPM or not?



      From what I understand nginx is passing the path to php-fpm and from the nginx debug log I can see that the path passed is the right one but php-fpm still executes the old one.



      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/current/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 posix_memalign: 00000000010517A0:4096 @16
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "SCRIPT_FILENAME"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/ive/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/app.php"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "SCRIPT_FILENAME: /shop/www/htdocs/live/releases/20140923124417/web/app.php"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "DOCUMENT_ROOT"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/live/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "DOCUMENT_ROOT: /shop/www/htdocs/live/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "APPLICATION_ENV"


      What am I missing? thanks










      share|improve this question
















      I'm trying to get atomic deployments, I don't want to lose/drop any requests.



      I deploy the code using Capistrano, classic situation were you have a 'current' dir that is a symlink to
      the latest release in the 'release' folder.
      I'm using Nginx, PHP 5.5 FPM with Opcache.
      Following the idea of just using $realpath_root in Nginx I'm expecting that a simple nginx reload would suffice, but it's not.
      With nginx reload it seems that I'm not losing any requests but php-fpm is still executing the code from the previous old dir.
      If I do a 'php-fpm reload' then php fpm is reading from the new dir but I can still see that I'm losing some requests:




      'recv() failed (104: Connection reset by peer) while reading response header from upstream'




      The question is: should I reload PHP FPM or not?



      From what I understand nginx is passing the path to php-fpm and from the nginx debug log I can see that the path passed is the right one but php-fpm still executes the old one.



      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/current/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 posix_memalign: 00000000010517A0:4096 @16
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "SCRIPT_FILENAME"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/ive/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/app.php"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "SCRIPT_FILENAME: /shop/www/htdocs/live/releases/20140923124417/web/app.php"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "DOCUMENT_ROOT"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script var: "/shop/www/htdocs/live/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 fastcgi param: "DOCUMENT_ROOT: /shop/www/htdocs/live/releases/20140923124417/web"
      2014/09/23 17:13:22 [debug] 26234#0: *1742 http script copy: "APPLICATION_ENV"


      What am I missing? thanks







      nginx php-fpm php5 deployment






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 23 '14 at 18:26







      cirpo

















      asked Sep 23 '14 at 13:31









      cirpocirpo

      1092




      1092




















          2 Answers
          2






          active

          oldest

          votes


















          0














          It sounds like you have made changes to the default OPcache configuration.



          The defaults are:



          opcache.validate_timestamps = 1
          opcache.revalidate_freq = 2


          This specifies whether and for how long OPcache should wait before checking to see if a file on disk has changed. In this case, yes, and after two seconds.



          First, try re-enabling this option, as it sounds like you have turned it off.






          share|improve this answer























          • why? opcache works with realpath as far as I know.

            – cirpo
            Sep 23 '14 at 13:38











          • checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

            – cirpo
            Sep 23 '14 at 13:39


















          0














          I also faced that issue then finally I make a solution.



          $ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar
          $ chmod +x cachetool.phar


          You can connect to a automatically guessed fastcgi server (if /var/run/php5-fpm.sock is a file or 127.0.0.1:9000)



          apc
          apc:bin:dump Get a binary dump of files and user variables
          apc:bin:load Load a binary dump into the APC file and user variables
          apc:cache:clear Clears APC cache (user, system or all)
          apc:cache:info Shows APC user & system cache information
          apc:cache:info:file Shows APC file cache information
          apc:key:delete Deletes an APC key
          apc:key:exists Checks if an APC key exists
          apc:key:fetch Shows the content of an APC key
          apc:key:store Store an APC key with given value
          apc:sma:info Show APC shared memory allocation information
          opcache
          opcache:configuration Get configuration information about the cache
          opcache:reset Resets the contents of the opcode cache
          opcache:status Show summary information about the opcode cache
          opcache:status:scripts Show scripts in the opcode cache


          Example :



           [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
          +----------------------+---------------------------------+
          | Name | Value |
          +----------------------+---------------------------------+
          | Enabled | Yes |
          | Cache full | No |
          | Restart pending | No |
          | Restart in progress | No |
          | Memory used | 42.71 MiB |
          | Memory free | 85.29 MiB |
          | Memory wasted (%) | 0 b (0%) |
          | Strings buffer size | 8 MiB |
          | Strings memory used | 5.31 MiB |
          | Strings memory free | 2.69 MiB |
          | Number of strings | 103847 |
          +----------------------+---------------------------------+
          | Cached scripts | 1261 |
          | Cached keys | 2748 |
          | Max cached keys | 7963 |
          | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
          | Last restart time | Thu, 08 Feb 2018 03:10:19 +0000 |
          | Oom restarts | 0 |
          | Hash restarts | 0 |
          | Manual restarts | 1 |
          | Hits | 47839 |
          | Misses | 1269 |
          | Blacklist misses (%) | 0 (0%) |
          | Opcache hit rate | 97.415899649752 |
          +----------------------+---------------------------------+
          [root@ip-172-31-5-244 ~]#
          [root@ip-172-31-5-244 ~]#
          [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:reset
          [root@ip-172-31-5-244 ~]#
          [root@ip-172-31-5-244 ~]#
          [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
          +----------------------+---------------------------------+
          | Name | Value |
          +----------------------+---------------------------------+
          | Enabled | Yes |
          | Cache full | No |
          | Restart pending | No |
          | Restart in progress | No |
          | Memory used | 10.43 MiB |
          | Memory free | 117.57 MiB |
          | Memory wasted (%) | 0 b (0%) |
          | Strings buffer size | 8 MiB |
          | Strings memory used | 545.69 KiB |
          | Strings memory free | 7.47 MiB |
          | Number of strings | 103847 |
          +----------------------+---------------------------------+
          | Cached scripts | 0 |
          | Cached keys | 0 |
          | Max cached keys | 7963 |
          | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
          | Last restart time | Thu, 08 Feb 2018 03:19:00 +0000 |
          | Oom restarts | 0 |
          | Hash restarts | 0 |
          | Manual restarts | 2 |
          | Hits | 0 |
          | Misses | 2 |
          | Blacklist misses (%) | 0 (0%) |
          | Opcache hit rate | 0 |
          +----------------------+---------------------------------+


          You can notice that the memory , cache keys , hits everythings became 0 :-). Its very useful. I also intrigrated it with Ansible easily.



          Its application for apcu and others stuffs : Check more there
          http://gordalina.github.io/cachetool/






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "2"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f630573%2fatomic-deployments-with-nginx-and-php-fpm%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            It sounds like you have made changes to the default OPcache configuration.



            The defaults are:



            opcache.validate_timestamps = 1
            opcache.revalidate_freq = 2


            This specifies whether and for how long OPcache should wait before checking to see if a file on disk has changed. In this case, yes, and after two seconds.



            First, try re-enabling this option, as it sounds like you have turned it off.






            share|improve this answer























            • why? opcache works with realpath as far as I know.

              – cirpo
              Sep 23 '14 at 13:38











            • checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

              – cirpo
              Sep 23 '14 at 13:39















            0














            It sounds like you have made changes to the default OPcache configuration.



            The defaults are:



            opcache.validate_timestamps = 1
            opcache.revalidate_freq = 2


            This specifies whether and for how long OPcache should wait before checking to see if a file on disk has changed. In this case, yes, and after two seconds.



            First, try re-enabling this option, as it sounds like you have turned it off.






            share|improve this answer























            • why? opcache works with realpath as far as I know.

              – cirpo
              Sep 23 '14 at 13:38











            • checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

              – cirpo
              Sep 23 '14 at 13:39













            0












            0








            0







            It sounds like you have made changes to the default OPcache configuration.



            The defaults are:



            opcache.validate_timestamps = 1
            opcache.revalidate_freq = 2


            This specifies whether and for how long OPcache should wait before checking to see if a file on disk has changed. In this case, yes, and after two seconds.



            First, try re-enabling this option, as it sounds like you have turned it off.






            share|improve this answer













            It sounds like you have made changes to the default OPcache configuration.



            The defaults are:



            opcache.validate_timestamps = 1
            opcache.revalidate_freq = 2


            This specifies whether and for how long OPcache should wait before checking to see if a file on disk has changed. In this case, yes, and after two seconds.



            First, try re-enabling this option, as it sounds like you have turned it off.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 23 '14 at 13:36









            Michael HamptonMichael Hampton

            174k27319646




            174k27319646












            • why? opcache works with realpath as far as I know.

              – cirpo
              Sep 23 '14 at 13:38











            • checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

              – cirpo
              Sep 23 '14 at 13:39

















            • why? opcache works with realpath as far as I know.

              – cirpo
              Sep 23 '14 at 13:38











            • checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

              – cirpo
              Sep 23 '14 at 13:39
















            why? opcache works with realpath as far as I know.

            – cirpo
            Sep 23 '14 at 13:38





            why? opcache works with realpath as far as I know.

            – cirpo
            Sep 23 '14 at 13:38













            checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

            – cirpo
            Sep 23 '14 at 13:39





            checking what opcache contains I can see different paths for the same file, so it shouldn't be the problem... right?

            – cirpo
            Sep 23 '14 at 13:39













            0














            I also faced that issue then finally I make a solution.



            $ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar
            $ chmod +x cachetool.phar


            You can connect to a automatically guessed fastcgi server (if /var/run/php5-fpm.sock is a file or 127.0.0.1:9000)



            apc
            apc:bin:dump Get a binary dump of files and user variables
            apc:bin:load Load a binary dump into the APC file and user variables
            apc:cache:clear Clears APC cache (user, system or all)
            apc:cache:info Shows APC user & system cache information
            apc:cache:info:file Shows APC file cache information
            apc:key:delete Deletes an APC key
            apc:key:exists Checks if an APC key exists
            apc:key:fetch Shows the content of an APC key
            apc:key:store Store an APC key with given value
            apc:sma:info Show APC shared memory allocation information
            opcache
            opcache:configuration Get configuration information about the cache
            opcache:reset Resets the contents of the opcode cache
            opcache:status Show summary information about the opcode cache
            opcache:status:scripts Show scripts in the opcode cache


            Example :



             [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
            +----------------------+---------------------------------+
            | Name | Value |
            +----------------------+---------------------------------+
            | Enabled | Yes |
            | Cache full | No |
            | Restart pending | No |
            | Restart in progress | No |
            | Memory used | 42.71 MiB |
            | Memory free | 85.29 MiB |
            | Memory wasted (%) | 0 b (0%) |
            | Strings buffer size | 8 MiB |
            | Strings memory used | 5.31 MiB |
            | Strings memory free | 2.69 MiB |
            | Number of strings | 103847 |
            +----------------------+---------------------------------+
            | Cached scripts | 1261 |
            | Cached keys | 2748 |
            | Max cached keys | 7963 |
            | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
            | Last restart time | Thu, 08 Feb 2018 03:10:19 +0000 |
            | Oom restarts | 0 |
            | Hash restarts | 0 |
            | Manual restarts | 1 |
            | Hits | 47839 |
            | Misses | 1269 |
            | Blacklist misses (%) | 0 (0%) |
            | Opcache hit rate | 97.415899649752 |
            +----------------------+---------------------------------+
            [root@ip-172-31-5-244 ~]#
            [root@ip-172-31-5-244 ~]#
            [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:reset
            [root@ip-172-31-5-244 ~]#
            [root@ip-172-31-5-244 ~]#
            [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
            +----------------------+---------------------------------+
            | Name | Value |
            +----------------------+---------------------------------+
            | Enabled | Yes |
            | Cache full | No |
            | Restart pending | No |
            | Restart in progress | No |
            | Memory used | 10.43 MiB |
            | Memory free | 117.57 MiB |
            | Memory wasted (%) | 0 b (0%) |
            | Strings buffer size | 8 MiB |
            | Strings memory used | 545.69 KiB |
            | Strings memory free | 7.47 MiB |
            | Number of strings | 103847 |
            +----------------------+---------------------------------+
            | Cached scripts | 0 |
            | Cached keys | 0 |
            | Max cached keys | 7963 |
            | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
            | Last restart time | Thu, 08 Feb 2018 03:19:00 +0000 |
            | Oom restarts | 0 |
            | Hash restarts | 0 |
            | Manual restarts | 2 |
            | Hits | 0 |
            | Misses | 2 |
            | Blacklist misses (%) | 0 (0%) |
            | Opcache hit rate | 0 |
            +----------------------+---------------------------------+


            You can notice that the memory , cache keys , hits everythings became 0 :-). Its very useful. I also intrigrated it with Ansible easily.



            Its application for apcu and others stuffs : Check more there
            http://gordalina.github.io/cachetool/






            share|improve this answer



























              0














              I also faced that issue then finally I make a solution.



              $ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar
              $ chmod +x cachetool.phar


              You can connect to a automatically guessed fastcgi server (if /var/run/php5-fpm.sock is a file or 127.0.0.1:9000)



              apc
              apc:bin:dump Get a binary dump of files and user variables
              apc:bin:load Load a binary dump into the APC file and user variables
              apc:cache:clear Clears APC cache (user, system or all)
              apc:cache:info Shows APC user & system cache information
              apc:cache:info:file Shows APC file cache information
              apc:key:delete Deletes an APC key
              apc:key:exists Checks if an APC key exists
              apc:key:fetch Shows the content of an APC key
              apc:key:store Store an APC key with given value
              apc:sma:info Show APC shared memory allocation information
              opcache
              opcache:configuration Get configuration information about the cache
              opcache:reset Resets the contents of the opcode cache
              opcache:status Show summary information about the opcode cache
              opcache:status:scripts Show scripts in the opcode cache


              Example :



               [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
              +----------------------+---------------------------------+
              | Name | Value |
              +----------------------+---------------------------------+
              | Enabled | Yes |
              | Cache full | No |
              | Restart pending | No |
              | Restart in progress | No |
              | Memory used | 42.71 MiB |
              | Memory free | 85.29 MiB |
              | Memory wasted (%) | 0 b (0%) |
              | Strings buffer size | 8 MiB |
              | Strings memory used | 5.31 MiB |
              | Strings memory free | 2.69 MiB |
              | Number of strings | 103847 |
              +----------------------+---------------------------------+
              | Cached scripts | 1261 |
              | Cached keys | 2748 |
              | Max cached keys | 7963 |
              | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
              | Last restart time | Thu, 08 Feb 2018 03:10:19 +0000 |
              | Oom restarts | 0 |
              | Hash restarts | 0 |
              | Manual restarts | 1 |
              | Hits | 47839 |
              | Misses | 1269 |
              | Blacklist misses (%) | 0 (0%) |
              | Opcache hit rate | 97.415899649752 |
              +----------------------+---------------------------------+
              [root@ip-172-31-5-244 ~]#
              [root@ip-172-31-5-244 ~]#
              [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:reset
              [root@ip-172-31-5-244 ~]#
              [root@ip-172-31-5-244 ~]#
              [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
              +----------------------+---------------------------------+
              | Name | Value |
              +----------------------+---------------------------------+
              | Enabled | Yes |
              | Cache full | No |
              | Restart pending | No |
              | Restart in progress | No |
              | Memory used | 10.43 MiB |
              | Memory free | 117.57 MiB |
              | Memory wasted (%) | 0 b (0%) |
              | Strings buffer size | 8 MiB |
              | Strings memory used | 545.69 KiB |
              | Strings memory free | 7.47 MiB |
              | Number of strings | 103847 |
              +----------------------+---------------------------------+
              | Cached scripts | 0 |
              | Cached keys | 0 |
              | Max cached keys | 7963 |
              | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
              | Last restart time | Thu, 08 Feb 2018 03:19:00 +0000 |
              | Oom restarts | 0 |
              | Hash restarts | 0 |
              | Manual restarts | 2 |
              | Hits | 0 |
              | Misses | 2 |
              | Blacklist misses (%) | 0 (0%) |
              | Opcache hit rate | 0 |
              +----------------------+---------------------------------+


              You can notice that the memory , cache keys , hits everythings became 0 :-). Its very useful. I also intrigrated it with Ansible easily.



              Its application for apcu and others stuffs : Check more there
              http://gordalina.github.io/cachetool/






              share|improve this answer

























                0












                0








                0







                I also faced that issue then finally I make a solution.



                $ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar
                $ chmod +x cachetool.phar


                You can connect to a automatically guessed fastcgi server (if /var/run/php5-fpm.sock is a file or 127.0.0.1:9000)



                apc
                apc:bin:dump Get a binary dump of files and user variables
                apc:bin:load Load a binary dump into the APC file and user variables
                apc:cache:clear Clears APC cache (user, system or all)
                apc:cache:info Shows APC user & system cache information
                apc:cache:info:file Shows APC file cache information
                apc:key:delete Deletes an APC key
                apc:key:exists Checks if an APC key exists
                apc:key:fetch Shows the content of an APC key
                apc:key:store Store an APC key with given value
                apc:sma:info Show APC shared memory allocation information
                opcache
                opcache:configuration Get configuration information about the cache
                opcache:reset Resets the contents of the opcode cache
                opcache:status Show summary information about the opcode cache
                opcache:status:scripts Show scripts in the opcode cache


                Example :



                 [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
                +----------------------+---------------------------------+
                | Name | Value |
                +----------------------+---------------------------------+
                | Enabled | Yes |
                | Cache full | No |
                | Restart pending | No |
                | Restart in progress | No |
                | Memory used | 42.71 MiB |
                | Memory free | 85.29 MiB |
                | Memory wasted (%) | 0 b (0%) |
                | Strings buffer size | 8 MiB |
                | Strings memory used | 5.31 MiB |
                | Strings memory free | 2.69 MiB |
                | Number of strings | 103847 |
                +----------------------+---------------------------------+
                | Cached scripts | 1261 |
                | Cached keys | 2748 |
                | Max cached keys | 7963 |
                | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
                | Last restart time | Thu, 08 Feb 2018 03:10:19 +0000 |
                | Oom restarts | 0 |
                | Hash restarts | 0 |
                | Manual restarts | 1 |
                | Hits | 47839 |
                | Misses | 1269 |
                | Blacklist misses (%) | 0 (0%) |
                | Opcache hit rate | 97.415899649752 |
                +----------------------+---------------------------------+
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:reset
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
                +----------------------+---------------------------------+
                | Name | Value |
                +----------------------+---------------------------------+
                | Enabled | Yes |
                | Cache full | No |
                | Restart pending | No |
                | Restart in progress | No |
                | Memory used | 10.43 MiB |
                | Memory free | 117.57 MiB |
                | Memory wasted (%) | 0 b (0%) |
                | Strings buffer size | 8 MiB |
                | Strings memory used | 545.69 KiB |
                | Strings memory free | 7.47 MiB |
                | Number of strings | 103847 |
                +----------------------+---------------------------------+
                | Cached scripts | 0 |
                | Cached keys | 0 |
                | Max cached keys | 7963 |
                | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
                | Last restart time | Thu, 08 Feb 2018 03:19:00 +0000 |
                | Oom restarts | 0 |
                | Hash restarts | 0 |
                | Manual restarts | 2 |
                | Hits | 0 |
                | Misses | 2 |
                | Blacklist misses (%) | 0 (0%) |
                | Opcache hit rate | 0 |
                +----------------------+---------------------------------+


                You can notice that the memory , cache keys , hits everythings became 0 :-). Its very useful. I also intrigrated it with Ansible easily.



                Its application for apcu and others stuffs : Check more there
                http://gordalina.github.io/cachetool/






                share|improve this answer













                I also faced that issue then finally I make a solution.



                $ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar
                $ chmod +x cachetool.phar


                You can connect to a automatically guessed fastcgi server (if /var/run/php5-fpm.sock is a file or 127.0.0.1:9000)



                apc
                apc:bin:dump Get a binary dump of files and user variables
                apc:bin:load Load a binary dump into the APC file and user variables
                apc:cache:clear Clears APC cache (user, system or all)
                apc:cache:info Shows APC user & system cache information
                apc:cache:info:file Shows APC file cache information
                apc:key:delete Deletes an APC key
                apc:key:exists Checks if an APC key exists
                apc:key:fetch Shows the content of an APC key
                apc:key:store Store an APC key with given value
                apc:sma:info Show APC shared memory allocation information
                opcache
                opcache:configuration Get configuration information about the cache
                opcache:reset Resets the contents of the opcode cache
                opcache:status Show summary information about the opcode cache
                opcache:status:scripts Show scripts in the opcode cache


                Example :



                 [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
                +----------------------+---------------------------------+
                | Name | Value |
                +----------------------+---------------------------------+
                | Enabled | Yes |
                | Cache full | No |
                | Restart pending | No |
                | Restart in progress | No |
                | Memory used | 42.71 MiB |
                | Memory free | 85.29 MiB |
                | Memory wasted (%) | 0 b (0%) |
                | Strings buffer size | 8 MiB |
                | Strings memory used | 5.31 MiB |
                | Strings memory free | 2.69 MiB |
                | Number of strings | 103847 |
                +----------------------+---------------------------------+
                | Cached scripts | 1261 |
                | Cached keys | 2748 |
                | Max cached keys | 7963 |
                | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
                | Last restart time | Thu, 08 Feb 2018 03:10:19 +0000 |
                | Oom restarts | 0 |
                | Hash restarts | 0 |
                | Manual restarts | 1 |
                | Hits | 47839 |
                | Misses | 1269 |
                | Blacklist misses (%) | 0 (0%) |
                | Opcache hit rate | 97.415899649752 |
                +----------------------+---------------------------------+
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:reset
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]#
                [root@ip-172-31-5-244 ~]# php cachetool.phar opcache:status
                +----------------------+---------------------------------+
                | Name | Value |
                +----------------------+---------------------------------+
                | Enabled | Yes |
                | Cache full | No |
                | Restart pending | No |
                | Restart in progress | No |
                | Memory used | 10.43 MiB |
                | Memory free | 117.57 MiB |
                | Memory wasted (%) | 0 b (0%) |
                | Strings buffer size | 8 MiB |
                | Strings memory used | 545.69 KiB |
                | Strings memory free | 7.47 MiB |
                | Number of strings | 103847 |
                +----------------------+---------------------------------+
                | Cached scripts | 0 |
                | Cached keys | 0 |
                | Max cached keys | 7963 |
                | Start time | Thu, 08 Feb 2018 02:28:56 +0000 |
                | Last restart time | Thu, 08 Feb 2018 03:19:00 +0000 |
                | Oom restarts | 0 |
                | Hash restarts | 0 |
                | Manual restarts | 2 |
                | Hits | 0 |
                | Misses | 2 |
                | Blacklist misses (%) | 0 (0%) |
                | Opcache hit rate | 0 |
                +----------------------+---------------------------------+


                You can notice that the memory , cache keys , hits everythings became 0 :-). Its very useful. I also intrigrated it with Ansible easily.



                Its application for apcu and others stuffs : Check more there
                http://gordalina.github.io/cachetool/







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 8 '18 at 3:27









                Kernelv5Kernelv5

                1445




                1445



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f630573%2fatomic-deployments-with-nginx-and-php-fpm%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                    Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                    Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020