Ошибка too many requests per second

От частых запросов выходит эта ошибка, как её можно исправить?

#Парсер VK
function pars_api($group)
{
	global $token;
	$Request = "owner_id=-".$group."&filter=owner&count=2&access_token=".$token."&v=5.73";
	$url = 'https://api.vk.com/method/wall.get';
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, $url);
	curl_setopt($curl, CURLOPT_POST, 1);
	curl_setopt($curl, CURLOPT_POSTFIELDS, urldecode($Request));
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($curl);
	curl_close($curl);
	$a_post = json_decode($result);
	global $it;
	$pinned = 1;	
if (($a_post->response->items[0]->is_pinned == $pinned)) // Проверяем есть ли закрепленная запись
{    
	 $it = 1;
} else {	 
	$it = 0; 
}	
	if(!empty($a_post->error))
	{
		debug_mess("ответ error: (".$a_post->error->error_code.")".$a_post->error->error_msg,3);
		send_mailo('получения');
		//continue; // php 7.0 не рабит
	}
	return $a_post;
}

Из официальной документации

3. Ограничения и рекомендации

3.1. Частотные ограничения

К методам API ВКонтакте (за исключением методов из секций secure и ads) можно обращаться не чаще 3 раз в секунду. Если логика Вашего приложения подразумевает вызов нескольких методов подряд, имеет смысл обратить внимание на метод execute. Он позволяет совершить до 25 обращений к разным методам в рамках одного запроса.

Для методов секции ads действуют собственные ограничения, ознакомиться с ними Вы можете на этой странице.

Максимальное число обращений к серверным (secure) методам зависит от числа пользователей, установивших приложение. Если приложение установило меньше 10 000 человек, то можно совершать 5 запросов в секунду, до 100 000 — 8 запросов, до 1 000 000 — 20 запросов, больше 1 млн. — 35 запросов в секунду.

Если Вы превысите частотное ограничение, сервер вернет ошибку с кодом 6: "Too many requests per second.".

3.2. Количественные ограничения

Помимо ограничений на частоту обращений, существуют и количественные ограничения на вызов однотипных методов. По понятным причинам, мы не предоставляем информацию о точных лимитах.

После превышения количественного лимита доступ к конкретному методу может требовать ввода капчи (см. captcha_error), а также может быть временно ограничен (в таком случае сервер не возвращает ответ на вызов конкретного метода, но без проблем обрабатывает любые другие запросы).

При работе с API в Контакте можно встретить следующий ответ:

{'error': 'Too many requests per second', 'error_code': 6}

Значение 6 ключа error_code говорит о том, что превышено допустимое количество обращений api в течение некоторого времени (обычно в течение секунды).

Обработать его можно достаточно легко, например:

import requests
import time


def get_vk_data(method, params, max_attempts=20):
    url = f'https://api.vk.com/method/{method}'
    attempt = 0
    while attempt < max_attempts:
        resp = requests.get(url, params=params)
        data = resp.json()

        if 'error' in data and data['error'].get('error_code') == 6:
            time.sleep(2)
            attempt += 1
            continue
        
        break

    return data

Другими словами, мы пытаемся получить ответ (в переменную data) до тех пор, пока либо не будет ошибки (покаdata не будет содержать ключ error), либо код ошибки будет отличный от 6. Также предусмотрим максимальное количество попыток получить данные.

В качестве примера приведу обновление (синхронизацию) информации пользователя ВК:

class VKUser(models.Model):
    vk_user_id = models.IntegerField(_('VK User ID'), null=True, blank=True)

    screen_name = models.CharField(_('Screen name'), max_length=100, blank=True)
    pic_url = models.URLField(_('Pic url'), blank=True)

    first_name = models.CharField(_('First name'), max_length=100)
    last_name = models.CharField(_('Last name'), max_length=100)

    def sync_data(self):
        params = {
            'v': '3.0',
            'access_token': settings.ACCESS_TOKEN,
            'user_ids': self.vk_user_id,
            'fields': 'first_name, last_name, screen_name, photo_100',
        }

        data = get_vk_data('users.get', params)['response'][0]

        self.first_name = data['first_name']
        self.last_name = data['last_name']
        self.screen_name = data.get('screen_name', '')
        self.pic_url = data['photo_100']

        self.save()

Метод sync_data() обновляет поля: имя и фамилия пользователя, а также его аватар и короткое имя (screen_name).

Теперь этот код можно использовать так:

for vk_user in VKUser.objects.all():
    vk_user.sync_data()

для того, чтобы обновить информацию о всех пользователях.

Обратите внимание, что можно было бы передать в params['user_ids] список id пользователей, чтобы в одном запросе получить информацию о всех нужных пользователях, а не в цикле поочерёдно получать информацию о пользователе. Но иногда нужно именно поочерёдно использовать для получения некоторых полей, например, counters (https://dev.vk.com/reference/objects/user#counters)

Оцените статью

После нажатия кнопки «Отправить» ваше сообщение будет доставлено мне на почту.

Артём Мальцев

Веб-разработчик, владеющий знаниями языка программирования Python, фреймворка Django, системы управления содержимым сайта Django CMS, платформы для создания интернет-магазина Django Shop и многих различных приложений, использующих эти технологии.

Права на использование материала, расположенного на этой странице https://vivazzi.pro/ru/it/vk-error-6/:

Разрешается копировать материал с указанием её автора и ссылки на оригинал без использования параметра rel="nofollow" в теге <a>. Использование:

Автор статьи: Артём Мальцев
Ссылка на статью: <a href="https://vivazzi.pro/ru/it/vk-error-6/">https://vivazzi.pro/ru/it/vk-error-6/</a>

Больше: Правила использования сайта

Представляю вашему вниманию книгу, написанную моим близким другом Максимом Макуриным: Секреты эффективного управления ассортиментом.

Книга предназначается для широкого круга читателей и, по мнению автора, будет полезна специалистам отдела закупок и логистики, категорийным и финансовым менеджерам, менеджерам по продажам, аналитикам, руководителям и директорам, в компетенции которых принятие решений по управлению ассортиментом.

Вы находитесь в новой версии нашей документации. Сейчас мы активно переносим статьи и некоторый контент может быть не доступен. Вы все еще можете воспользоваться
 старой версией 
документации.

  • Общие вопросы
  • Некстайп: Альфа
  • Некстайп: Магнит
  • Некстайп: Мобильный магазин для iOS и Android
  • Некстайп: Прайм
  • Некстайп: Корпорация
  • Некстайп: МиниМаркет
  • Некстайп: Премиум
  • Некстайп: СберМегаМаркет
  • Модуль «Карта сайта с поддержкой поддоменов»
  • Модуль «Контент с привязкой к местоположению по IP»
  • Модуль «Простые формы»

Ошибка «You have made too many requests per second»

Иногда вы или посетитель вашего сайта можете получить ошибку «503 Service Temporarily Unavailable. You have made too many requests per second». Это защитный функционал 1С — Битрикс, который закрывает доступ слишком активному пользователю на 5 минут (по умолчанию). Если вы или посетители вашего проекта получаете данное предупреждение слишком часто, тогда можно изменить настройки данного функционала.

В административной части Настройки > Проактивная защита > Контроль активности, на вкладке «Контроль активности» вы можете выключить данный функционал (не рекомендуется).

На вкладке «Параметры» вы можете изменить время блокировки, а так же количество хитов (запросов к сайту) и время, за которое нужно совершить данное количество хитов для блокировки.

ООО «Некстайп» 2022 © Все права защищены

При взаимодействии с веб-ресурсами можно столкнуться с различными проблемами. Одна их таких проблем – ошибка с кодом 429 Too Many Requests. Существует две самые распространенные причины возникновения этой ошибки сервера, с которыми нам предстоит разобраться самостоятельно. 

Причины появления ошибки сервера 429

DDoS-атаки

Начать следует с того, что чаще всего ошибка 429 сопровождается надписью «The user has sent too many requests in a given amount of time», что означает превышение ограничений по запросам к сайту. Соответственно, именно так происходит предотвращение DDoS-атак, которые и являются основной причиной появления рассматриваемой проблемы. Помимо самого кода, вы увидите и несколько других параметров:

  1. Общее количество запросов.

  2. Запросы с конкретного IP-адреса в секунду.

  3. Количество одновременных запросов.

  4. Общее количество запросов с одного IP-адреса.

Если же сама ошибка появляется при использовании поисковых систем или сторонних онлайн-сервисов, которые запрашивают доступ к сайту, вполне возможно, что их блокировка осуществляется со стороны хостинга в связи с тем, что количество запросов превышает ограничение. Для ее решения вам потребуется обратиться напрямую в техническую поддержку с просьбой разрешить подобные запросы.

В случае, когда есть уверенность в том, что ошибка http 429 появилась именно из-за атак на ваш ресурс, советую ознакомиться с отдельным материалом, в котором вы узнаете, как обезопасить себя от DDoS эффективными инструментами и банальными мерами предосторожности.

Подробнее: Способы защиты от DDoS-атаки

Некорректная работа плагинов WordPress

Вторая распространенная причина, которая может быть связана с регулярным появлением неполадки 429, – некорректное функционирование плагинов под управлением CMS WordPress. Для решения этой проблемы потребуется выполнить несколько несложных действий. 

Для начала по очереди отключайте каждый установленный скрипт через меню управления этими компонентами. Параллельно проверяйте, появляется ли ошибка. Да, на выполнение этой задачи может уйти много времени, однако это самый эффективный метод выявления плагина, который является триггером. Отметим, что сразу несколько компонентов могут вызывать проблему, поэтому постарайтесь проверить их все.

Отключение плагинов ВордпрессЧто касается использования плагинов, то тут всегда лучше подключать только проверенные и качественные решения. Со списком таких плагинов предлагаю ознакомиться в материале по следующей ссылке.

Если после проверки неполадка все еще не исчезла, переключитесь на стандартную тему WordPress, которая называется Twenty Seventeen. Это действие поможет понять, связана ли ошибка сервера 429 со скриптами, которые входят в пользовательский шаблон оформления сайта. В том случае, когда трудность действительно была связана с темой, придется переделать ее вручную или же подыскать новый вариант для своего веб-ресурса.

Действия со стороны обычного пользователя

Обычный пользователь, который сталкивается с неполадкой 429 при попытке просмотреть конкретный сайт, не сможет ничего предпринять самостоятельно, чтобы решить ее. Однако, если есть возможность, стоит обратиться напрямую к владельцу интернет-ресурса или администраторам, сообщив им о появившейся ошибке. Так вы дадите понять, что сайт работает не так, как это нужно, и ускорите процесс решения трудностей.

Страница недоступна, ошибка 429

Ошибка HTTP с кодом 429 – неприятная ситуация, которая может коснуться каждого владельца сайта. Из приведенного выше материала вы поняли, что существует две основные причины, которые могут ее вызывать. Теперь остается только разобраться с каждой из них и провести проверочные работы, чтобы оперативно исправить сложившуюся ситуацию.

Sooner or later, every website runs into a bug or error that’s difficult to troubleshoot. Often, that’s because the error itself doesn’t give you many details. The 429 Too Many Requests error is one such example.

We know what its most common causes are, fortunately. Since there are several potential culprits, however, you’ll often need to try more than one fix before you can resolve it.

In this article, we’re going to talk about what causes the 429 Too Many Requests error and what it looks like. Then we’ll go over five ways you can troubleshoot your website if you ever run into this particular issue. Let’s get to work!

  • What is the HTTP 429 Error
  • What Causes the 429 Too Many Requests Error
  • How to Fix the 429 Too Many Requests Error (5 Methods)

How to Fix 429 Too Many Requests in WordPress:

You’re receiving the 429 Too Many Requests error message because the user has sent too many requests in a given amount of time (could be a plugin, a DDos, or something else). It’s a server telling you to please stop sending requests.

To fix it in WordPress, try one of these 5 methods:

  1. Change your WordPress default login URL
  2. Check whether your  HTTPS internal links are causing the issue
  3. Deactivate all your WordPress plugin
  4. Switch to a default WordPress theme
  5. Contact your hosting provider

What is the HTTP 429 Error?

The HTTP 429 error is returned when a user has sent too many requests within a short period of time. The 429 status code is intended for use with rate-limiting schemes.

Check Out Our Video Guide to the 429 Too Many Requests Error

What Causes the HTTP 429 Too Many Requests Error

In some cases, when your server detects that a user agent is trying to access a specific page too often in a short period of time, it triggers a rate-limiting feature. The most common example of this is when a user (or an attacker) repeatedly tries to log into your site.

However, your server may also identify users with cookies, rather than by their login credentials. Requests may also be counted on a per-request basis, across your server, or across several servers. So there are a variety of situations that can result in you seeing an error like one of these:

  • 429 Too Many Requests
  • 429 Error
  • HTTP 429
  • Error 429 (Too Many Requests)

The error may also include additional details regarding the reason for the 429 status code, and how long the user must wait before attempting to log in again. Here’s an example of what that might look like:

HTTP/1.1 429 Too Many Requests
Content-type: text/html
Retry-After: 3600
<html>
<head>
<title>Too Many Requests</title>
</head>
<body>
<h1>Too Many Requests</h1>
<p>I only allow 50 requests per hour to this website per logged in user. Try again soon. </p>
</body>
</html>

Regardless of how the error appears, it always means the same thing – there’s a user or a snippet of code that’s overwhelming your server with too many requests. Sometimes, the problem can go away on its own. In other situations, such as those caused by issues with a plugin or Denial of Service (DDoS) attacks, you’ll need to be proactive in order to resolve the error.

The problem is that the 429 error most often affects your login page, which can make it impossible for you to access your website’s dashboard. That can make fixing it a little tricky, but it’s still achievable if you know what to try.

How to Fix the 429 Too Many Requests Error (5 Methods)

As you might imagine, we deal with a lot of WordPress support requests due to the nature of the services we offer. That means we’re intimately familiar with the 429 error, and its many potential causes.

In the following sections, we’ll cover five of the most common causes we’ve seen for the 429 Too Many Requests error in WordPress. For each potential issue, we’ll also teach you how to go about fixing it, so you can get your site back up and running quickly.

1. Change Your WordPress Default Login URL

Brute-force login attempts are one of the leading causes of the 429 error on WordPress websites. One quick way to prevent attackers from trying to break through your WordPress login page is to change its URL from the default option, so they can’t find it in the first place.

By default, you can find your login page by navigating to yourwebsite.com/wp-admin. That’s pretty easy to remember, but it’s also downright insecure since everyone on the web will know exactly where to access it.

The easiest way to change your default WordPress URL is by using the free WPS Hide Login plugin:

WPS Hide Login

WPS Hide Login plugin

Let’s walk through the process of using this particular tool. You’ll first want to install and activate the plugin just as you would any other, and then navigate to the Settings > WPS Hide Login tab in your WordPress dashboard:

Changing login URL

Changing the login URL

Here, you can easily change your login URL by typing in whatever extension you’d like to use. Make sure to stay away from easy-to-guess options such as login, wp-login, and so on. This would defeat the purpose of changing your URL in the first place, so you’ll want to come up with something unique to your site.

Note that this plugin also enables you to redirect users who try to access your old login URL to another page. For example, the default option will show anyone who tries to visit /wp-admin a 404 error page, so they’ll know they’re looking in the wrong place. When you’re done, remember to save the changes to your settings, and you’ll be good to go.

2. Disable the Really Simple SSL Plugin and Replace Your Internal Links

These days, there’s no good reason you shouldn’t have a Secure Sockets Layer (SSL) certificate set up for your website. Likewise, your entire website should load over HTTPS. This is far more secure than using the older HTTP protocol, and it can even have a positive effect on your site’s Search Engine Optimization (SEO).

When it comes to enforcing HTTPS use, you can either use the manual route – such as an .htaccess redirect – or a plugin. One of the most popular choices is Really Simple SSL:

Really Simple SSL

Really Simple SSL plugin

This plugin’s appeal is that it forces your entire website to load over HTTPS with just a couple of clicks. However, in our experience, it can also lead to occasional bugs. For instance, under some circumstances, it can trigger the 429 error we’ve been talking about.

There’s nothing inherently wrong with this plugin, but it’s definitely not the best way to implement HTTPS use. The problem is that, even if you implement HTTPS manually, you’re still left with the problem of what to do about internal links. Chances are there are a lot of internal links throughout your website, so you’ll need to find a way to replace all of them with their HTTPS versions after disabling the plugin.

First, you’ll want to take care of the plugin itself. If you have access to the WordPress admin area, disabling Really Simple SSL shouldn’t be an issue – just hit Deactivate and you’re done:

Deactivating really simple ssl

Deactivating the Really Simple SSL plugin

However since the 429 Too Many Requests Error often blocks you from accessing your dashboard, you might have to take the manual route and disable the plugin using an FTP client.

Either way, once the Really Simple SSL plugin is gone, the 429 error should be resolved. That means you can access your dashboard to set up a new plugin, which will help you replace all of your internal links in one swoop. That plugin is called Search and Replace:

Search and Replace

Search and Replace plugin

Go ahead and activate the plugin, then navigate to the Tools > Search & Replace tab in WordPress. Inside, select the wp_postmeta table, and then enter the following parameters alongside the Search for and Replace with fields respectively:

If your site uses a non-www domain:

http://yourwebsiteurl.com
https://yourwebsiteurl.com

In some cases, there may be www instances of your domain in the database as well, so we also recommend running another search and replace with the settings below.

http://www.yourwebsiteurl.com
https://yourwebsiteurl.com

If your site uses a www domain:

http://www.yourwebsiteurl.com
https://www.yourwebsiteurl.com

To replace non-www instances of your domain in the database, run another search and replace with the settings below:

http://www.yourwebsiteurl.com
https://yourwebsiteurl.com

Then select the dry run option, which will let you know how many instances of your HTTP URLs the plugin will replace within your database. After that dry run, execute the plugin for real and it will replace all the necessary links.

Keep in mind that after disabling the Really Simple SSL plugin, you’ll also need to set up a site-wide HTTPS redirect using your .htaccess file. This will enable you to implement HTTPS effectively, without the risk of further 429 errors.

3. Temporarily Deactivate All of Your WordPress Plugins

So far, we’ve focused on a single plugin that may cause the 429 error. However, in practice, any plugin could cause this issue if it makes too many external requests. If neither of the above methods leads to a solution in your case, it may be time to try disabling all of your plugins at once, to ensure that they aren’t the problem.

For this section, we’ll assume you don’t have access to your dashboard and can’t disable plugins the usual way. In that case, you’ll need to access your website via FTP using a client such as Filezilla, and navigate to the public_html/wp-content/ directory.

Inside, there should be several folders, one of which is called plugins:

Plugins folder

Plugins folder

Right click on that folder, and change its name to something else, such as plugins.deactivated. Once you do that, WordPress won’t be able to ‘find’ any of the plugins, and it will automatically deactivate all of them. However, before you try to access your site again, go ahead and create a new empty folder called plugins, so WordPress will still function as normal.

If the 429 error is gone when you next visit your site, you can assume that one of the plugins you turned off was the culprit. That means you need to narrow down which one caused the problem. To do that, you’ll want to:

  1. Delete the empty plugins directory you set up a minute ago, and restore the previous folder to its original name.
  2. Access the plugins directory.
  3. Rename one of the plugin folders within to anything else, which will deactivate only that specific plugin.
  4. Try to access your website, and see if the 429 error is gone.
  5. If the error persists, return that plugin folder to its original name and repeat steps 3 and 4 with the next one.

By moving down your list of active plugins one by one, you should eventually discover which one is the culprit. Once you figure out which plugin is behind the 429 Too Many Requests error, you can delete it altogether, which should fix the issue.

4. Switch to a Default WordPress Theme

If it turns out that a plugin isn’t the cause of your 429 error, it’s possible that your active theme might be at fault. To figure out if that’s the case, you can disable your active theme manually, forcing WordPress to switch to one of the default templates that ships with the CMS.

This process works much the same as disabling plugins manually. You’ll want to launch your trusty FTP client once more, and this time navigate to the public_html/wp-content/themes directory. Once there, look for the folder that corresponds to your active theme and rename it to anything else you want.

If you try to access your website after that, the 429 Too Many Requests error should be gone. You’ll also notice that everything looks quite a bit different. Don’t panic, though, your theme and all of its customizations are still there.

All you need to do is return the theme folder to its original name and activate it once more. If the 429 error returns afterward, then you might need to contact the theme’s developers or consider changing your site’s theme and delete it eventually.

5. Contact Your Host If You Still Can’t Resolve the Error

In some instances, it’s possible that the cause behind the 429 error originated with your server, rather than with your website itself. If this is the case for you, no amount of work on your part will be able to fully resolve the problem.

For example, some web hosts will block requests from specific third-party services or platforms. These can include search engines, crawlers, and other apps (such as Google Search Console) that make large numbers of requests to your website.

Contacting your hosting provider and asking them to allow these requests can solve the issue. Additionally, even if limitations placed on your server by your host aren’t the cause of the problem, they may be able to provide valuable insight and advice that can help you find the correct solution.

Getting the 429 Too Many Requests error message? That’s a bummer but don’t despair, we’ve got you covered with our guide!😭🤗Click to Tweet

Summary

Encountering an error on your website is always frustrating. However, as far as errors go, those with number codes at least give you enough information to start fixing them. If you run into the 429 Too Many Requests error, you’ll know that something is overwhelming your server with too many requests, so it’s only a matter of identifying what the source of the problem is.

If you do happen to experience the 429 error, here are five ways you can go about troubleshooting it:

  1. Change your default WordPress login URL.
  2. Disable the Really Simple SSL plugin.
  3. Temporarily deactivate all of your WordPress plugins.
  4. Switch to a default WordPress theme.
  5. Contact your host if you still can’t resolve the error.

Do you have any questions about how to fix the 429 Too Many Requests error in WordPress? Let’s talk about them in the comments section below!


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275+ PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Sooner or later, every website runs into a bug or error that’s difficult to troubleshoot. Often, that’s because the error itself doesn’t give you many details. The 429 Too Many Requests error is one such example.

We know what its most common causes are, fortunately. Since there are several potential culprits, however, you’ll often need to try more than one fix before you can resolve it.

In this article, we’re going to talk about what causes the 429 Too Many Requests error and what it looks like. Then we’ll go over five ways you can troubleshoot your website if you ever run into this particular issue. Let’s get to work!

  • What is the HTTP 429 Error
  • What Causes the 429 Too Many Requests Error
  • How to Fix the 429 Too Many Requests Error (5 Methods)

How to Fix 429 Too Many Requests in WordPress:

You’re receiving the 429 Too Many Requests error message because the user has sent too many requests in a given amount of time (could be a plugin, a DDos, or something else). It’s a server telling you to please stop sending requests.

To fix it in WordPress, try one of these 5 methods:

  1. Change your WordPress default login URL
  2. Check whether your  HTTPS internal links are causing the issue
  3. Deactivate all your WordPress plugin
  4. Switch to a default WordPress theme
  5. Contact your hosting provider

What is the HTTP 429 Error?

The HTTP 429 error is returned when a user has sent too many requests within a short period of time. The 429 status code is intended for use with rate-limiting schemes.

Check Out Our Video Guide to the 429 Too Many Requests Error

What Causes the HTTP 429 Too Many Requests Error

In some cases, when your server detects that a user agent is trying to access a specific page too often in a short period of time, it triggers a rate-limiting feature. The most common example of this is when a user (or an attacker) repeatedly tries to log into your site.

However, your server may also identify users with cookies, rather than by their login credentials. Requests may also be counted on a per-request basis, across your server, or across several servers. So there are a variety of situations that can result in you seeing an error like one of these:

  • 429 Too Many Requests
  • 429 Error
  • HTTP 429
  • Error 429 (Too Many Requests)

The error may also include additional details regarding the reason for the 429 status code, and how long the user must wait before attempting to log in again. Here’s an example of what that might look like:

HTTP/1.1 429 Too Many Requests
Content-type: text/html
Retry-After: 3600
<html>
<head>
<title>Too Many Requests</title>
</head>
<body>
<h1>Too Many Requests</h1>
<p>I only allow 50 requests per hour to this website per logged in user. Try again soon. </p>
</body>
</html>

Regardless of how the error appears, it always means the same thing – there’s a user or a snippet of code that’s overwhelming your server with too many requests. Sometimes, the problem can go away on its own. In other situations, such as those caused by issues with a plugin or Denial of Service (DDoS) attacks, you’ll need to be proactive in order to resolve the error.

The problem is that the 429 error most often affects your login page, which can make it impossible for you to access your website’s dashboard. That can make fixing it a little tricky, but it’s still achievable if you know what to try.

How to Fix the 429 Too Many Requests Error (5 Methods)

As you might imagine, we deal with a lot of WordPress support requests due to the nature of the services we offer. That means we’re intimately familiar with the 429 error, and its many potential causes.

In the following sections, we’ll cover five of the most common causes we’ve seen for the 429 Too Many Requests error in WordPress. For each potential issue, we’ll also teach you how to go about fixing it, so you can get your site back up and running quickly.

1. Change Your WordPress Default Login URL

Brute-force login attempts are one of the leading causes of the 429 error on WordPress websites. One quick way to prevent attackers from trying to break through your WordPress login page is to change its URL from the default option, so they can’t find it in the first place.

By default, you can find your login page by navigating to yourwebsite.com/wp-admin. That’s pretty easy to remember, but it’s also downright insecure since everyone on the web will know exactly where to access it.

The easiest way to change your default WordPress URL is by using the free WPS Hide Login plugin:

WPS Hide Login

WPS Hide Login plugin

Let’s walk through the process of using this particular tool. You’ll first want to install and activate the plugin just as you would any other, and then navigate to the Settings > WPS Hide Login tab in your WordPress dashboard:

Changing login URL

Changing the login URL

Here, you can easily change your login URL by typing in whatever extension you’d like to use. Make sure to stay away from easy-to-guess options such as login, wp-login, and so on. This would defeat the purpose of changing your URL in the first place, so you’ll want to come up with something unique to your site.

Note that this plugin also enables you to redirect users who try to access your old login URL to another page. For example, the default option will show anyone who tries to visit /wp-admin a 404 error page, so they’ll know they’re looking in the wrong place. When you’re done, remember to save the changes to your settings, and you’ll be good to go.

2. Disable the Really Simple SSL Plugin and Replace Your Internal Links

These days, there’s no good reason you shouldn’t have a Secure Sockets Layer (SSL) certificate set up for your website. Likewise, your entire website should load over HTTPS. This is far more secure than using the older HTTP protocol, and it can even have a positive effect on your site’s Search Engine Optimization (SEO).

When it comes to enforcing HTTPS use, you can either use the manual route – such as an .htaccess redirect – or a plugin. One of the most popular choices is Really Simple SSL:

Really Simple SSL

Really Simple SSL plugin

This plugin’s appeal is that it forces your entire website to load over HTTPS with just a couple of clicks. However, in our experience, it can also lead to occasional bugs. For instance, under some circumstances, it can trigger the 429 error we’ve been talking about.

There’s nothing inherently wrong with this plugin, but it’s definitely not the best way to implement HTTPS use. The problem is that, even if you implement HTTPS manually, you’re still left with the problem of what to do about internal links. Chances are there are a lot of internal links throughout your website, so you’ll need to find a way to replace all of them with their HTTPS versions after disabling the plugin.

First, you’ll want to take care of the plugin itself. If you have access to the WordPress admin area, disabling Really Simple SSL shouldn’t be an issue – just hit Deactivate and you’re done:

Deactivating really simple ssl

Deactivating the Really Simple SSL plugin

However since the 429 Too Many Requests Error often blocks you from accessing your dashboard, you might have to take the manual route and disable the plugin using an FTP client.

Either way, once the Really Simple SSL plugin is gone, the 429 error should be resolved. That means you can access your dashboard to set up a new plugin, which will help you replace all of your internal links in one swoop. That plugin is called Search and Replace:

Search and Replace

Search and Replace plugin

Go ahead and activate the plugin, then navigate to the Tools > Search & Replace tab in WordPress. Inside, select the wp_postmeta table, and then enter the following parameters alongside the Search for and Replace with fields respectively:

If your site uses a non-www domain:

http://yourwebsiteurl.com
https://yourwebsiteurl.com

In some cases, there may be www instances of your domain in the database as well, so we also recommend running another search and replace with the settings below.

http://www.yourwebsiteurl.com
https://yourwebsiteurl.com

If your site uses a www domain:

http://www.yourwebsiteurl.com
https://www.yourwebsiteurl.com

To replace non-www instances of your domain in the database, run another search and replace with the settings below:

http://www.yourwebsiteurl.com
https://yourwebsiteurl.com

Then select the dry run option, which will let you know how many instances of your HTTP URLs the plugin will replace within your database. After that dry run, execute the plugin for real and it will replace all the necessary links.

Keep in mind that after disabling the Really Simple SSL plugin, you’ll also need to set up a site-wide HTTPS redirect using your .htaccess file. This will enable you to implement HTTPS effectively, without the risk of further 429 errors.

3. Temporarily Deactivate All of Your WordPress Plugins

So far, we’ve focused on a single plugin that may cause the 429 error. However, in practice, any plugin could cause this issue if it makes too many external requests. If neither of the above methods leads to a solution in your case, it may be time to try disabling all of your plugins at once, to ensure that they aren’t the problem.

For this section, we’ll assume you don’t have access to your dashboard and can’t disable plugins the usual way. In that case, you’ll need to access your website via FTP using a client such as Filezilla, and navigate to the public_html/wp-content/ directory.

Inside, there should be several folders, one of which is called plugins:

Plugins folder

Plugins folder

Right click on that folder, and change its name to something else, such as plugins.deactivated. Once you do that, WordPress won’t be able to ‘find’ any of the plugins, and it will automatically deactivate all of them. However, before you try to access your site again, go ahead and create a new empty folder called plugins, so WordPress will still function as normal.

If the 429 error is gone when you next visit your site, you can assume that one of the plugins you turned off was the culprit. That means you need to narrow down which one caused the problem. To do that, you’ll want to:

  1. Delete the empty plugins directory you set up a minute ago, and restore the previous folder to its original name.
  2. Access the plugins directory.
  3. Rename one of the plugin folders within to anything else, which will deactivate only that specific plugin.
  4. Try to access your website, and see if the 429 error is gone.
  5. If the error persists, return that plugin folder to its original name and repeat steps 3 and 4 with the next one.

By moving down your list of active plugins one by one, you should eventually discover which one is the culprit. Once you figure out which plugin is behind the 429 Too Many Requests error, you can delete it altogether, which should fix the issue.

4. Switch to a Default WordPress Theme

If it turns out that a plugin isn’t the cause of your 429 error, it’s possible that your active theme might be at fault. To figure out if that’s the case, you can disable your active theme manually, forcing WordPress to switch to one of the default templates that ships with the CMS.

This process works much the same as disabling plugins manually. You’ll want to launch your trusty FTP client once more, and this time navigate to the public_html/wp-content/themes directory. Once there, look for the folder that corresponds to your active theme and rename it to anything else you want.

If you try to access your website after that, the 429 Too Many Requests error should be gone. You’ll also notice that everything looks quite a bit different. Don’t panic, though, your theme and all of its customizations are still there.

All you need to do is return the theme folder to its original name and activate it once more. If the 429 error returns afterward, then you might need to contact the theme’s developers or consider changing your site’s theme and delete it eventually.

5. Contact Your Host If You Still Can’t Resolve the Error

In some instances, it’s possible that the cause behind the 429 error originated with your server, rather than with your website itself. If this is the case for you, no amount of work on your part will be able to fully resolve the problem.

For example, some web hosts will block requests from specific third-party services or platforms. These can include search engines, crawlers, and other apps (such as Google Search Console) that make large numbers of requests to your website.

Contacting your hosting provider and asking them to allow these requests can solve the issue. Additionally, even if limitations placed on your server by your host aren’t the cause of the problem, they may be able to provide valuable insight and advice that can help you find the correct solution.

Getting the 429 Too Many Requests error message? That’s a bummer but don’t despair, we’ve got you covered with our guide!😭🤗Click to Tweet

Summary

Encountering an error on your website is always frustrating. However, as far as errors go, those with number codes at least give you enough information to start fixing them. If you run into the 429 Too Many Requests error, you’ll know that something is overwhelming your server with too many requests, so it’s only a matter of identifying what the source of the problem is.

If you do happen to experience the 429 error, here are five ways you can go about troubleshooting it:

  1. Change your default WordPress login URL.
  2. Disable the Really Simple SSL plugin.
  3. Temporarily deactivate all of your WordPress plugins.
  4. Switch to a default WordPress theme.
  5. Contact your host if you still can’t resolve the error.

Do you have any questions about how to fix the 429 Too Many Requests error in WordPress? Let’s talk about them in the comments section below!


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275+ PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Понравилась статья? Поделить с друзьями:
  • Ошибка too many different cell formats
  • Ошибка too many arguments
  • Ошибка too few arguments to function
  • Ошибка tom clancy s rainbow six siege
  • Ошибка token expired