{"id":1268,"date":"2020-07-21T19:37:29","date_gmt":"2020-07-21T19:37:29","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2020\/07\/21\/4274567-how-to-fix-the-max_connections_per_hour-mysql-error-at-hostinger\/"},"modified":"2026-03-16T12:12:14","modified_gmt":"2026-03-16T12:12:14","slug":"4274567-how-to-fix-the-max_connections_per_hour-mysql-error-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/4274567-how-to-fix-the-max_connections_per_hour-mysql-error-at-hostinger\/","title":{"rendered":"How to Fix the Max_Connections_Per_Hour MySQL Error at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">If your website is hosted in Hostinger and you are receiving an error with <b>max_connections_per_hour<\/b> limit:<\/p><p class=\"no-margin\">\n<\/p><pre><code>Connection failed: User 'u1000000_database' has exceeded the<br>'max_connections_per_hour' resource (current value: 500)<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">You can try the following:<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_05d6a8729b\">Option 1 &ndash; Use Localhost<\/h2><p class=\"no-margin\">Make sure that the database hostname is set to the <b>localhost <\/b>in your website&rsquo;s <b><a href=\"\/support\/3313359-where-to-find-your-website-s-configuration-file\" target=\"_blank\" class=\"intercom-content-link\">configuration file<\/a><\/b>, such as <b>wp-config.php<\/b>.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\"><b>It is not recommended<\/b> to set your database hostname to your hosting IP.<\/p>\n<\/div><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">For example, if your current database configuration details are set up like this:<\/p><pre><code>\/** The name of the database for WordPress *\/<br>define( 'DB_NAME', 'u1000000_database' );<br>\/** MySQL hostname *\/<br>define( 'DB_HOST', '185.185.185.185' );<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Make sure to replace the last line value of <b>DB_HOST<\/b> to <b>localhost <\/b>as follows:<\/p><pre><code>\/** The name of the database for WordPress *\/<br>define( 'DB_NAME', 'u1000000_database' );<br>\/** MySQL hostname *\/<br>define( 'DB_HOST', 'localhost' );<\/code><\/pre><p class=\"no-margin\">\n<\/p><h2 id=\"h_7f0f5900a0\">Option 2 &ndash; Stop the Processes<\/h2><p class=\"no-margin\">Some unoptimized code on your website can cause you to reach the <b>max_user_connections<\/b> limit. To solve it, you can terminate such connections manually by following these steps:<\/p><ol>\n<li>\n<p class=\"no-margin\"><b><a href=\"\/support\/1583545-how-to-access-phpmyadmin-at-hostinger\" target=\"_blank\" class=\"intercom-content-link\">Open your database via phpMyAdmin<\/a><\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Click <b>SQL<\/b> on the top menu, type <b>SHOW PROCESSLIST<\/b> and click <b>GO<\/b>:<br>&#8203;<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2020\/07\/e4ad6cab-0471-4fa2-b592-7c424e7e8b8a.jpg\"><\/div>\n<p class=\"no-margin\">\n<\/p><\/li>\n<li>\n<p class=\"no-margin\">Once that&rsquo;s done, the list of current processes will be generated. You can stop each one by clicking on <b>Stop the process<\/b>: <br>&#8203;<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2020\/07\/48281a13-9f9c-495c-b852-47a1185ba437.jpg\"><\/div>\n<\/li>\n<\/ol><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Please note that stopping the processes will help only temporarily. For a more permanent solution, you will need to optimize your database queries or <b><a href=\"\/support\/1583459-how-can-i-upgrade-my-hosting-account\" target=\"_blank\" class=\"intercom-content-link\">upgrade your plan<\/a><\/b> &#128640; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solving max_connections_per_hour error<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[241],"tags":[],"class_list":["post-1268","post","type-post","status-publish","format-standard","hentry","category-database-troubleshooting"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/4274567-how-to-fix-the-max_connections_per_hour-mysql-error-at-hostinger\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/4274567-como-corregir-el-error-de-mysql-max_connections_per_hour-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/4274567-comment-reparer-l-erreur-mysql-max_connections_per_hour-at-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/4274567-bagaimana-cara-mengatasi-error-max_connections_per_hour-di-mysql-di-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/4274567----mysql-max_connections_per_hour--hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1268"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1268\/revisions"}],"predecessor-version":[{"id":4859,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1268\/revisions\/4859"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}