enterprise_refresh_index Sleeping MySQL Connection Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Problems with reindexing productsAdd to cart / checkout performance issuesSet Magento MySQL Connection to use SSLMagento 1.9.1 with MySQL 5.5Magento Enterprise - Ongoing Redis Connection ErrorsMySQL error when targetrule indexer is executedMysql Query to Create a custom reportMySQL server has gone away when maual reindex catalog_product_flatMagento 2.0 with upgraded to php 7.0 Indexer Stuck at processingRogue “enterprise_refresh_index” causing excessive Merchandising failures

Table formatting with tabularx?

Calculation of line of sight system gain

How to make an animal which can only breed for a certain number of generations?

Diophantine equation 3^a+1=3^b+5^c

Does the Rock Gnome trait Artificer's Lore apply when you aren't proficient in History?

Sally's older brother

Why do C and C++ allow the expression (int) + 4*5;

The Nth Gryphon Number

Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?

Random body shuffle every night—can we still function?

Does a random sequence of vectors span a Hilbert space?

How to ask rejected full-time candidates to apply to teach individual courses?

How to name indistinguishable henchmen in a screenplay?

Getting representations of the Lie group out of representations of its Lie algebra

Should man-made satellites feature an intelligent inverted "cow catcher"?

Problem with display of presentation

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Twin's vs. Twins'

Baking rewards as operations

3D Masyu - A Die

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

What did Turing mean when saying that "machines cannot give rise to surprises" is due to a fallacy?

Did John Wesley plagiarize Matthew Henry...?

Determine whether an integer is a palindrome



enterprise_refresh_index Sleeping MySQL Connection



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Problems with reindexing productsAdd to cart / checkout performance issuesSet Magento MySQL Connection to use SSLMagento 1.9.1 with MySQL 5.5Magento Enterprise - Ongoing Redis Connection ErrorsMySQL error when targetrule indexer is executedMysql Query to Create a custom reportMySQL server has gone away when maual reindex catalog_product_flatMagento 2.0 with upgraded to php 7.0 Indexer Stuck at processingRogue “enterprise_refresh_index” causing excessive Merchandising failures



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7















There are times that the indexer that is ran by cron seems to get stuck at the MySQL as Sleeping connections can be seen. Indexer runs for several hours and this actually not running at all. I've searched for this but I couldn't find any related. Anyone who can shed a light? Possibly server configuration or Magento bug?










share|improve this question
















bumped to the homepage by Community 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.





















    7















    There are times that the indexer that is ran by cron seems to get stuck at the MySQL as Sleeping connections can be seen. Indexer runs for several hours and this actually not running at all. I've searched for this but I couldn't find any related. Anyone who can shed a light? Possibly server configuration or Magento bug?










    share|improve this question
















    bumped to the homepage by Community 5 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      7












      7








      7








      There are times that the indexer that is ran by cron seems to get stuck at the MySQL as Sleeping connections can be seen. Indexer runs for several hours and this actually not running at all. I've searched for this but I couldn't find any related. Anyone who can shed a light? Possibly server configuration or Magento bug?










      share|improve this question
















      There are times that the indexer that is ran by cron seems to get stuck at the MySQL as Sleeping connections can be seen. Indexer runs for several hours and this actually not running at all. I've searched for this but I couldn't find any related. Anyone who can shed a light? Possibly server configuration or Magento bug?







      magento-enterprise mysql reindex indexer






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 12 '15 at 7:23









      Marius

      168k28324692




      168k28324692










      asked Jun 12 '15 at 4:10









      user1240207user1240207

      77421031




      77421031





      bumped to the homepage by Community 5 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 5 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          2 Answers
          2






          active

          oldest

          votes


















          0














          Are you using persistent connections? How many sleep connections do you have? What is the max amount of connections your DB Server is configured to allow?



          To check how many sleep connections you have just run:



          show full processlist;


          To see the max_connections run:



          show variables like 'max_connections';


          I think that the sleeping connections are not the problem, mysqld will timeout sleep connections based on 2 values:



          interactive_timeout
          wait_timetout



          Both are 28800 seconds (8 hours) by default.



          You can set these options in my.cnf (location of this file is different in different OS and DBs, percona, mysql, etc)



          Also see this answer from Database Administrators: https://dba.stackexchange.com/a/1559 and if you would like to know more on how to debug the origin of the sleeping connections check this excellent article: https://www.percona.com/blog/2007/02/08/debugging-sleeping-connections-with-mysql/



          "If your connections are persistent (opened via mysql_pconnect) you could lower these numbers to something reasonable like 600 (10 min) or even 60 (1 min). Or, if your app works just fine, you can leave the default. This is up to you."



          Try to run the indexer from the console to see if it outputs some error:



          php shell/indexer info # this will output the list of indexes then
          php shell/indexer --reindex index_name





          share|improve this answer

























          • Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

            – user1240207
            Jul 3 '15 at 3:25


















          0














          configure your mysql-server by setting a shorter timeout on wait_timeout and interactive_timeout



          mysql> show variables like "%timeout%";



          +--------------------------+-------+
          | Variable_name | Value |
          +--------------------------+-------+
          | connect_timeout | 5 |
          | delayed_insert_timeout | 300 |
          | innodb_lock_wait_timeout | 50 |
          | interactive_timeout | 28800 |
          | net_read_timeout | 30 |
          | net_write_timeout | 60 |
          | slave_net_timeout | 3600 |
          | table_lock_wait_timeout | 50 |
          | wait_timeout | 28800 |
          +--------------------------+-------+
          9 rows in set (0.00 sec)


          Set with:



          set global wait_timeout=3;
          set global interactive_timeout=3;


          (and also set in your configuration file, for when your server restarts)



          But you're treating the symptoms instead of the underlying cause - why are the connections open? If the PHP script finished, shouldn't they close? Make sure your webserver is not using connection pooling...






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2fmagento.stackexchange.com%2fquestions%2f70812%2fenterprise-refresh-index-sleeping-mysql-connection%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














            Are you using persistent connections? How many sleep connections do you have? What is the max amount of connections your DB Server is configured to allow?



            To check how many sleep connections you have just run:



            show full processlist;


            To see the max_connections run:



            show variables like 'max_connections';


            I think that the sleeping connections are not the problem, mysqld will timeout sleep connections based on 2 values:



            interactive_timeout
            wait_timetout



            Both are 28800 seconds (8 hours) by default.



            You can set these options in my.cnf (location of this file is different in different OS and DBs, percona, mysql, etc)



            Also see this answer from Database Administrators: https://dba.stackexchange.com/a/1559 and if you would like to know more on how to debug the origin of the sleeping connections check this excellent article: https://www.percona.com/blog/2007/02/08/debugging-sleeping-connections-with-mysql/



            "If your connections are persistent (opened via mysql_pconnect) you could lower these numbers to something reasonable like 600 (10 min) or even 60 (1 min). Or, if your app works just fine, you can leave the default. This is up to you."



            Try to run the indexer from the console to see if it outputs some error:



            php shell/indexer info # this will output the list of indexes then
            php shell/indexer --reindex index_name





            share|improve this answer

























            • Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

              – user1240207
              Jul 3 '15 at 3:25















            0














            Are you using persistent connections? How many sleep connections do you have? What is the max amount of connections your DB Server is configured to allow?



            To check how many sleep connections you have just run:



            show full processlist;


            To see the max_connections run:



            show variables like 'max_connections';


            I think that the sleeping connections are not the problem, mysqld will timeout sleep connections based on 2 values:



            interactive_timeout
            wait_timetout



            Both are 28800 seconds (8 hours) by default.



            You can set these options in my.cnf (location of this file is different in different OS and DBs, percona, mysql, etc)



            Also see this answer from Database Administrators: https://dba.stackexchange.com/a/1559 and if you would like to know more on how to debug the origin of the sleeping connections check this excellent article: https://www.percona.com/blog/2007/02/08/debugging-sleeping-connections-with-mysql/



            "If your connections are persistent (opened via mysql_pconnect) you could lower these numbers to something reasonable like 600 (10 min) or even 60 (1 min). Or, if your app works just fine, you can leave the default. This is up to you."



            Try to run the indexer from the console to see if it outputs some error:



            php shell/indexer info # this will output the list of indexes then
            php shell/indexer --reindex index_name





            share|improve this answer

























            • Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

              – user1240207
              Jul 3 '15 at 3:25













            0












            0








            0







            Are you using persistent connections? How many sleep connections do you have? What is the max amount of connections your DB Server is configured to allow?



            To check how many sleep connections you have just run:



            show full processlist;


            To see the max_connections run:



            show variables like 'max_connections';


            I think that the sleeping connections are not the problem, mysqld will timeout sleep connections based on 2 values:



            interactive_timeout
            wait_timetout



            Both are 28800 seconds (8 hours) by default.



            You can set these options in my.cnf (location of this file is different in different OS and DBs, percona, mysql, etc)



            Also see this answer from Database Administrators: https://dba.stackexchange.com/a/1559 and if you would like to know more on how to debug the origin of the sleeping connections check this excellent article: https://www.percona.com/blog/2007/02/08/debugging-sleeping-connections-with-mysql/



            "If your connections are persistent (opened via mysql_pconnect) you could lower these numbers to something reasonable like 600 (10 min) or even 60 (1 min). Or, if your app works just fine, you can leave the default. This is up to you."



            Try to run the indexer from the console to see if it outputs some error:



            php shell/indexer info # this will output the list of indexes then
            php shell/indexer --reindex index_name





            share|improve this answer















            Are you using persistent connections? How many sleep connections do you have? What is the max amount of connections your DB Server is configured to allow?



            To check how many sleep connections you have just run:



            show full processlist;


            To see the max_connections run:



            show variables like 'max_connections';


            I think that the sleeping connections are not the problem, mysqld will timeout sleep connections based on 2 values:



            interactive_timeout
            wait_timetout



            Both are 28800 seconds (8 hours) by default.



            You can set these options in my.cnf (location of this file is different in different OS and DBs, percona, mysql, etc)



            Also see this answer from Database Administrators: https://dba.stackexchange.com/a/1559 and if you would like to know more on how to debug the origin of the sleeping connections check this excellent article: https://www.percona.com/blog/2007/02/08/debugging-sleeping-connections-with-mysql/



            "If your connections are persistent (opened via mysql_pconnect) you could lower these numbers to something reasonable like 600 (10 min) or even 60 (1 min). Or, if your app works just fine, you can leave the default. This is up to you."



            Try to run the indexer from the console to see if it outputs some error:



            php shell/indexer info # this will output the list of indexes then
            php shell/indexer --reindex index_name






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:43









            Community

            1




            1










            answered Jun 12 '15 at 6:41









            lloiaconolloiacono

            2,9761338




            2,9761338












            • Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

              – user1240207
              Jul 3 '15 at 3:25

















            • Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

              – user1240207
              Jul 3 '15 at 3:25
















            Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

            – user1240207
            Jul 3 '15 at 3:25





            Unfortunately, we're still getting this issue. I run the show full process command and it displayed a very long SQL statements with entity IDs listed.

            – user1240207
            Jul 3 '15 at 3:25













            0














            configure your mysql-server by setting a shorter timeout on wait_timeout and interactive_timeout



            mysql> show variables like "%timeout%";



            +--------------------------+-------+
            | Variable_name | Value |
            +--------------------------+-------+
            | connect_timeout | 5 |
            | delayed_insert_timeout | 300 |
            | innodb_lock_wait_timeout | 50 |
            | interactive_timeout | 28800 |
            | net_read_timeout | 30 |
            | net_write_timeout | 60 |
            | slave_net_timeout | 3600 |
            | table_lock_wait_timeout | 50 |
            | wait_timeout | 28800 |
            +--------------------------+-------+
            9 rows in set (0.00 sec)


            Set with:



            set global wait_timeout=3;
            set global interactive_timeout=3;


            (and also set in your configuration file, for when your server restarts)



            But you're treating the symptoms instead of the underlying cause - why are the connections open? If the PHP script finished, shouldn't they close? Make sure your webserver is not using connection pooling...






            share|improve this answer



























              0














              configure your mysql-server by setting a shorter timeout on wait_timeout and interactive_timeout



              mysql> show variables like "%timeout%";



              +--------------------------+-------+
              | Variable_name | Value |
              +--------------------------+-------+
              | connect_timeout | 5 |
              | delayed_insert_timeout | 300 |
              | innodb_lock_wait_timeout | 50 |
              | interactive_timeout | 28800 |
              | net_read_timeout | 30 |
              | net_write_timeout | 60 |
              | slave_net_timeout | 3600 |
              | table_lock_wait_timeout | 50 |
              | wait_timeout | 28800 |
              +--------------------------+-------+
              9 rows in set (0.00 sec)


              Set with:



              set global wait_timeout=3;
              set global interactive_timeout=3;


              (and also set in your configuration file, for when your server restarts)



              But you're treating the symptoms instead of the underlying cause - why are the connections open? If the PHP script finished, shouldn't they close? Make sure your webserver is not using connection pooling...






              share|improve this answer

























                0












                0








                0







                configure your mysql-server by setting a shorter timeout on wait_timeout and interactive_timeout



                mysql> show variables like "%timeout%";



                +--------------------------+-------+
                | Variable_name | Value |
                +--------------------------+-------+
                | connect_timeout | 5 |
                | delayed_insert_timeout | 300 |
                | innodb_lock_wait_timeout | 50 |
                | interactive_timeout | 28800 |
                | net_read_timeout | 30 |
                | net_write_timeout | 60 |
                | slave_net_timeout | 3600 |
                | table_lock_wait_timeout | 50 |
                | wait_timeout | 28800 |
                +--------------------------+-------+
                9 rows in set (0.00 sec)


                Set with:



                set global wait_timeout=3;
                set global interactive_timeout=3;


                (and also set in your configuration file, for when your server restarts)



                But you're treating the symptoms instead of the underlying cause - why are the connections open? If the PHP script finished, shouldn't they close? Make sure your webserver is not using connection pooling...






                share|improve this answer













                configure your mysql-server by setting a shorter timeout on wait_timeout and interactive_timeout



                mysql> show variables like "%timeout%";



                +--------------------------+-------+
                | Variable_name | Value |
                +--------------------------+-------+
                | connect_timeout | 5 |
                | delayed_insert_timeout | 300 |
                | innodb_lock_wait_timeout | 50 |
                | interactive_timeout | 28800 |
                | net_read_timeout | 30 |
                | net_write_timeout | 60 |
                | slave_net_timeout | 3600 |
                | table_lock_wait_timeout | 50 |
                | wait_timeout | 28800 |
                +--------------------------+-------+
                9 rows in set (0.00 sec)


                Set with:



                set global wait_timeout=3;
                set global interactive_timeout=3;


                (and also set in your configuration file, for when your server restarts)



                But you're treating the symptoms instead of the underlying cause - why are the connections open? If the PHP script finished, shouldn't they close? Make sure your webserver is not using connection pooling...







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 14 '16 at 5:03









                CharlieCharlie

                1,90652755




                1,90652755



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • 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%2fmagento.stackexchange.com%2fquestions%2f70812%2fenterprise-refresh-index-sleeping-mysql-connection%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

                    Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

                    Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                    How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2