Как исправить ошибку 414

Ошибка 414. Причины ее возникновения и возможные решения

Ошибка 414 или Error 414 Request URI Too Large — почему она возникает и как ее устранить простому пользователю или владельцу собственного сайта. Начнем с того, что это довольно редкая, не распространенная ошибка. В оригинале ее название — Request URI Too Large.

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

Стоит заметить, что любой запрос условно делится на две составляющие:

  • Заголовок;
  • Тело.

В нормальных условиях в заголовке содержится только общая информация. Это значит, что он по своей природе не может быть слишком длинным. Тело же в свою очередь наоборот содержит всю основную часть запроса. Каким бы длинным и ёмким не было тело, сервер воспринимает это за норму и ошибка 414 не должна возникать. Так что в большинстве случаев причиной данной неполадки является именно заголовок и сбои в нем.

Как избавиться от ошибки 414?

Обычному пользователю никак. Если во время сёрфинга в Интернете вы столкнулись с этой нераспространенной проблемой, вы абсолютно бессильны. Нужно просто ждать, пока администраторы злосчастной страницы исправят ситуацию. Единственное, что доступно обычному пользователю – написание запроса в техническую поддержку.

Каковы действия должен совершить владелец сайта для того, чтобы исправить ошибку 414?

  1. Попытаться исключить ошибку непосредственно в коде ресурса.
  2. Сделать больше допустимый размер заголовка. За это отвечает 3 параметра, которые необходимо разместить в http:
  • сlіеnt_bоdу_buffеr_sіzе — отвечает за размер тела;
  • сlіеnt_hеаdеr_buffеr_sіzе — отвечает за обычные заголовки;
  • lаrgе_clіеnt_hеаdеr_buffеrs — отвечает за большие заголовки.

В случае с ошибкой 414 нам необходимо работать с последней строкой. Стандартно размер заголовка = 8kb. Вносим изменения в последнюю строку – дописываем 8 (пробел) 64k. Точно такие же исправления необходимо сделать в каждой строке перед секцией под названием «сервер». Теперь перезагружаем ресурс, ошибка 414 должна уйти. Если нет, то это означает, что вы сделали что-то неправильно.

Напоследок хотелось бы заметить, что если вы совсем не разбираетесь в системе nginx, то не делайте никаких изменений самостоятельно. Так вы не только не решите проблему, но и рискуете встретиться с другими ошибками в дальнейшем. В таком случае лучше обратиться к специалистам, для них справиться с этим не составит особого труда.

Дальше по теме…

WordPress errors don’t happen too often, given the stable codebase. What’s more, when something does pop up to dampen your day, it’s explicit. The 414 Request-URI Too Large error, for one, tells you exactly what the problem is. From there, you can attempt to fix it.

Much like many other WordPress errors, there are some specific steps you can take to resolve it. In short, you’ll need to adjust some configuration settings to allow for longer URLs. Once you’re finished, the error will be too.

In this article, we will walk you through how to fix the 414 Request-URI Too Large error. It will include the tools and skills you’ll need to solve the problem and list some “pre-steps” before getting under the hood.

Check out our video guide to fixing the 414 Request-URI Too Large error:

What the 414 Request-URI Too Large Error Is (And Why It Happens)

The 414 Request-URL Too Large error is a configuration issue. It’s one of the 400 error codes. They’re troublesome because it often means there’s a critical issue somewhere between your browser and a server.

In this case, a 414 error means that the URL is too long for the server to process, so it throws an exception. This could be an issue when using Urchin Tracking Module (UTM) codes to track conversions. These links can get long depending on the parameters you set, and if they reach the maximum limit of your site’s configuration, you’ll see the error.

As with many WordPress errors, there are many more things going on under the hood to cause a 414. In fact, you can group the causes into three distinct areas:

  • Converting a POST request to a GET request with query information that is too long. This is a developer-specific issue that happens at the coding level.
  • A redirect loop. We’ve talked about the best practices for redirects in a previous post. If you get into a redirect loop, the resulting URLs get too long, and the error will appear.
  • The server could be under attack, and a 414 error at this point will be the least of your worries.

Before we move on, it’s worth noting that for all intents and purposes, a URI and a URL are the same things. While there are some distinct differences between the two, we’re going to use “URL” here to keep things straightforward.

Ever seen this error pop up? 😅 Tackle it with no fear thanks to this guide 💪Click to Tweet

What You’ll Need to Fix the 414 Request-URI Too Large Error

If you’ve encountered the 413 Request Entity Too Large error in the past, you’ll find a 414 error to be similar. Of course, the names show their similarities, as they’re next to each other in the official standards and have almost identical descriptions.

Given this, the list of tools and skills you’d use for fixing a 413 will be the same for a 414 too:

  • Administrative access to your server
  • One of the many Secure File Transfer Protocol (SFTP) clients available
  • The right skills to use SFTP and navigate your server
  • A clean and current backup on hand in case you need to restore
  • A text editor, though this might not be necessary for you

If you’re a Kinsta customer, you’ll find your SFTP credentials within the MyKinsta dashboard, along with some other handy functionality to get into your server:

The SFTP panel in the MyKinsta dashboard.

The SFTP panel in the MyKinsta dashboard.

It’s also worth noting that we will connect through SFTP here because it’s more secure (hence the name).

What to Do Before You Begin Resolving the 414 Request-URI Too Large Error

Before you crack open the hood on your server and set it to work, you may want to carry out some “pre-steps” first. It could be that there’s a simple workaround that doesn’t involve you tinkering with your configuration files.

What’s more, these checks should be carried out at some point regardless, so getting them taken care of now will help in the long run.

First, a WordPress plugin might generate long URLs as part of its functionality. Full-featured, all-in-one security plugins can be a prime candidate here, especially if they offer lots of functionality.

It’s hard to know at a glance whether a plugin could be at fault, but it’s worth investigating its specific settings for a dedicated option to restrict the length of URLs. If so, toggling this could solve the 414 error within seconds.

Under normal circumstances, though, there are a few other tasks you can carry out to help you diagnose the error:

  • Check your server logs for mentions of the error or any other identifying entries.
  • Your browser developer tools may give you some indication of the error’s cause — especially your Console.
  • Reach out to the site owner or developer (if it’s not you) and let them know the error exists. It could be that they will have a fix or can advise you further on what to do.

Of course, you may want to contact both the site and plugin developers anyway if you’ve found that a plugin is at fault. Even so, if you’ve exhausted all of your outreach and top-level checks, it’s time to venture on.

How to Fix the 414 Request-URI Too Large Error (In 3 Steps)

Once you have your tools together, you’ll need a plan. The fix for the 414 Request-URI Too Large error is to alter a server configuration file. As such, there are three steps you can take.

Let’s start by getting into your server and figuring out which type of server you have.

1. Log In to Your Server (And Determine Your Server Type)

You have to get into the server before you work on it, and this is where your SFTP skills come into play.

We’ve outlined how to get into your site through SFTP in the past, and once you’re in, you’ll need to figure out what type of server you have. There are two main types: Apache and Nginx.

It could be that you already know which server type you run. If so, you can skip to the next step.

If you’re struggling, here’s a quick tip: look for a .htaccess file. It’s found in the root of your server, and if you can see it, this means you’re running an Apache server. Nginx servers use a different configuration file.

That said, it could be that you’re running an Apache server that doesn’t yet have a .htaccess file. As such, there are two other methods you could use:

  • Carry out a domain lookup using the Whois Domain Tools site: This might tell you the type of server you’re using, although it’s not a foolproof method.
  • Check with your hosting provider about the server type you use. Of course, your host is going to know what server you run. Kinsta customers will always use Nginx servers, although other providers may use Apache or a mix. It’s best to open a ticket with your host to check before you poke around in your site’s backend.

When you’ve determined which type of server you use, you can head onto the next step and find your configuration file.

2. Find the Server Configuration File and Open It in Your Text Editor

As we noted, Apache servers use a .htaccess file for basic server configuration, and it will be located in your root directory. This isn’t the file you need to fix the 414 Request-URI Too Large error, though.

In this case, you’ll need to go deeper into your advanced configuration settings. These are found not at your site’s root folder but the server’s root.

When you log into your site through SFTP, you’ll often come to a directory that contains all of your sites (along with some other files). In many cases, you can go up a couple of levels to a server root directory:

Navigating to the server root in Cyberduck.

Navigating to the server root in Cyberduck.

This will give you a few more directories to traverse. Among them will be the etc folder:

The etc folder within a server root directory.

The etc folder within a server root directory.

The full path of the configuration file will be /etc/apache2/apache2.conf.

The Apache configuration file.

The Apache configuration file.

For Nginx servers, the process is similar. It’s one we’ve covered in part within our article on adjusting the maximum upload size in WordPress. The path to the configuration file will be /etc/nginx/nginx.conf.

Once you’ve located your file, open it in your favorite text editor. At this point, you’re ready to adjust it.

3. Adjust the Configuration File To Allow for Longer URLs

Much like how Apache and Nginx servers have different configuration files, they also have different settings to adjust. Regardless of your server type, though, you’ll need to open it in an editor if you haven’t already done so. Our preferred approach is to download the file to your computer, work on it, and upload it back to the server.

For Apache configuration files, look for the LimitRequestLine setting, or add it to the bottom of your file if it’s not there:

Changing the Apache server configuration settings.

Changing the Apache server configuration settings.

For the value, use at least 128000. If you need to go higher than this, keep to multiples of two (i.e. the next value should be 256000).

For Nginx servers, you’re looking for the large_client_header_buffers setting. Here, you’ll see two values relating to number and size. For example, large_client_header_buffers 4 8K. The only figure you need to alter here is the size — you can go from 8K to around 128K, although you may need to increase this further (again in multiples of two).

Once you’re done, save your changes and upload your configuration file back to your server. At this point, check your site again, and the 414 Request-URI Too Large error should have gone.

The 414 Request-URI Too Large error may be annoying, but luckily, it tells you exactly what the problem is. 🤷‍♀️ Learn how to fix it here 👇Click to Tweet

Summary

WordPress errors often have a similar approach for resolving them. You’ll often need to diagnose the error first, though. In the case of the 414 Request-URI Too Large error, the problem is clear: the URLs being passed to the server are too big.

To fix it, you’ll need to change your Apache or Nginx server settings. This doesn’t take too long, and once you’re done, you should be back up and running. While we can’t speak for other hosts, Kinsta’s support team is on hand 24/7 to help you get over the 414 Request-URI Too Large error if you’re stuck. In fact, we’re here whenever you need our help and guidance, so you can get back to running your site.

WordPress errors don’t happen too often, given the stable codebase. What’s more, when something does pop up to dampen your day, it’s explicit. The 414 Request-URI Too Large error, for one, tells you exactly what the problem is. From there, you can attempt to fix it.

Much like many other WordPress errors, there are some specific steps you can take to resolve it. In short, you’ll need to adjust some configuration settings to allow for longer URLs. Once you’re finished, the error will be too.

In this article, we will walk you through how to fix the 414 Request-URI Too Large error. It will include the tools and skills you’ll need to solve the problem and list some “pre-steps” before getting under the hood.

Check out our video guide to fixing the 414 Request-URI Too Large error:

What the 414 Request-URI Too Large Error Is (And Why It Happens)

The 414 Request-URL Too Large error is a configuration issue. It’s one of the 400 error codes. They’re troublesome because it often means there’s a critical issue somewhere between your browser and a server.

In this case, a 414 error means that the URL is too long for the server to process, so it throws an exception. This could be an issue when using Urchin Tracking Module (UTM) codes to track conversions. These links can get long depending on the parameters you set, and if they reach the maximum limit of your site’s configuration, you’ll see the error.

As with many WordPress errors, there are many more things going on under the hood to cause a 414. In fact, you can group the causes into three distinct areas:

  • Converting a POST request to a GET request with query information that is too long. This is a developer-specific issue that happens at the coding level.
  • A redirect loop. We’ve talked about the best practices for redirects in a previous post. If you get into a redirect loop, the resulting URLs get too long, and the error will appear.
  • The server could be under attack, and a 414 error at this point will be the least of your worries.

Before we move on, it’s worth noting that for all intents and purposes, a URI and a URL are the same things. While there are some distinct differences between the two, we’re going to use “URL” here to keep things straightforward.

Ever seen this error pop up? 😅 Tackle it with no fear thanks to this guide 💪Click to Tweet

What You’ll Need to Fix the 414 Request-URI Too Large Error

If you’ve encountered the 413 Request Entity Too Large error in the past, you’ll find a 414 error to be similar. Of course, the names show their similarities, as they’re next to each other in the official standards and have almost identical descriptions.

Given this, the list of tools and skills you’d use for fixing a 413 will be the same for a 414 too:

  • Administrative access to your server
  • One of the many Secure File Transfer Protocol (SFTP) clients available
  • The right skills to use SFTP and navigate your server
  • A clean and current backup on hand in case you need to restore
  • A text editor, though this might not be necessary for you

If you’re a Kinsta customer, you’ll find your SFTP credentials within the MyKinsta dashboard, along with some other handy functionality to get into your server:

The SFTP panel in the MyKinsta dashboard.

The SFTP panel in the MyKinsta dashboard.

It’s also worth noting that we will connect through SFTP here because it’s more secure (hence the name).

What to Do Before You Begin Resolving the 414 Request-URI Too Large Error

Before you crack open the hood on your server and set it to work, you may want to carry out some “pre-steps” first. It could be that there’s a simple workaround that doesn’t involve you tinkering with your configuration files.

What’s more, these checks should be carried out at some point regardless, so getting them taken care of now will help in the long run.

First, a WordPress plugin might generate long URLs as part of its functionality. Full-featured, all-in-one security plugins can be a prime candidate here, especially if they offer lots of functionality.

It’s hard to know at a glance whether a plugin could be at fault, but it’s worth investigating its specific settings for a dedicated option to restrict the length of URLs. If so, toggling this could solve the 414 error within seconds.

Under normal circumstances, though, there are a few other tasks you can carry out to help you diagnose the error:

  • Check your server logs for mentions of the error or any other identifying entries.
  • Your browser developer tools may give you some indication of the error’s cause — especially your Console.
  • Reach out to the site owner or developer (if it’s not you) and let them know the error exists. It could be that they will have a fix or can advise you further on what to do.

Of course, you may want to contact both the site and plugin developers anyway if you’ve found that a plugin is at fault. Even so, if you’ve exhausted all of your outreach and top-level checks, it’s time to venture on.

How to Fix the 414 Request-URI Too Large Error (In 3 Steps)

Once you have your tools together, you’ll need a plan. The fix for the 414 Request-URI Too Large error is to alter a server configuration file. As such, there are three steps you can take.

Let’s start by getting into your server and figuring out which type of server you have.

1. Log In to Your Server (And Determine Your Server Type)

You have to get into the server before you work on it, and this is where your SFTP skills come into play.

We’ve outlined how to get into your site through SFTP in the past, and once you’re in, you’ll need to figure out what type of server you have. There are two main types: Apache and Nginx.

It could be that you already know which server type you run. If so, you can skip to the next step.

If you’re struggling, here’s a quick tip: look for a .htaccess file. It’s found in the root of your server, and if you can see it, this means you’re running an Apache server. Nginx servers use a different configuration file.

That said, it could be that you’re running an Apache server that doesn’t yet have a .htaccess file. As such, there are two other methods you could use:

  • Carry out a domain lookup using the Whois Domain Tools site: This might tell you the type of server you’re using, although it’s not a foolproof method.
  • Check with your hosting provider about the server type you use. Of course, your host is going to know what server you run. Kinsta customers will always use Nginx servers, although other providers may use Apache or a mix. It’s best to open a ticket with your host to check before you poke around in your site’s backend.

When you’ve determined which type of server you use, you can head onto the next step and find your configuration file.

2. Find the Server Configuration File and Open It in Your Text Editor

As we noted, Apache servers use a .htaccess file for basic server configuration, and it will be located in your root directory. This isn’t the file you need to fix the 414 Request-URI Too Large error, though.

In this case, you’ll need to go deeper into your advanced configuration settings. These are found not at your site’s root folder but the server’s root.

When you log into your site through SFTP, you’ll often come to a directory that contains all of your sites (along with some other files). In many cases, you can go up a couple of levels to a server root directory:

Navigating to the server root in Cyberduck.

Navigating to the server root in Cyberduck.

This will give you a few more directories to traverse. Among them will be the etc folder:

The etc folder within a server root directory.

The etc folder within a server root directory.

The full path of the configuration file will be /etc/apache2/apache2.conf.

The Apache configuration file.

The Apache configuration file.

For Nginx servers, the process is similar. It’s one we’ve covered in part within our article on adjusting the maximum upload size in WordPress. The path to the configuration file will be /etc/nginx/nginx.conf.

Once you’ve located your file, open it in your favorite text editor. At this point, you’re ready to adjust it.

3. Adjust the Configuration File To Allow for Longer URLs

Much like how Apache and Nginx servers have different configuration files, they also have different settings to adjust. Regardless of your server type, though, you’ll need to open it in an editor if you haven’t already done so. Our preferred approach is to download the file to your computer, work on it, and upload it back to the server.

For Apache configuration files, look for the LimitRequestLine setting, or add it to the bottom of your file if it’s not there:

Changing the Apache server configuration settings.

Changing the Apache server configuration settings.

For the value, use at least 128000. If you need to go higher than this, keep to multiples of two (i.e. the next value should be 256000).

For Nginx servers, you’re looking for the large_client_header_buffers setting. Here, you’ll see two values relating to number and size. For example, large_client_header_buffers 4 8K. The only figure you need to alter here is the size — you can go from 8K to around 128K, although you may need to increase this further (again in multiples of two).

Once you’re done, save your changes and upload your configuration file back to your server. At this point, check your site again, and the 414 Request-URI Too Large error should have gone.

The 414 Request-URI Too Large error may be annoying, but luckily, it tells you exactly what the problem is. 🤷‍♀️ Learn how to fix it here 👇Click to Tweet

Summary

WordPress errors often have a similar approach for resolving them. You’ll often need to diagnose the error first, though. In the case of the 414 Request-URI Too Large error, the problem is clear: the URLs being passed to the server are too big.

To fix it, you’ll need to change your Apache or Nginx server settings. This doesn’t take too long, and once you’re done, you should be back up and running. While we can’t speak for other hosts, Kinsta’s support team is on hand 24/7 to help you get over the 414 Request-URI Too Large error if you’re stuck. In fact, we’re here whenever you need our help and guidance, so you can get back to running your site.


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.

WordPress errors don’t happen too often, given the stable codebase. What’s more, when something does pop up to dampen your day, it’s explicit. The 414 Request-URI Too Large error, for one, tells you exactly what the problem is. From there, you can attempt to fix it.

Much like many other WordPress errors, there are some specific steps you can take to resolve it. In short, you’ll need to adjust some configuration settings to allow for longer URLs. Once you’re finished, the error will be too.

In this article, we will walk you through how to fix the 414 Request-URI Too Large error. It will include the tools and skills you’ll need to solve the problem and list some “pre-steps” before getting under the hood.

Check out our video guide to fixing the 414 Request-URI Too Large error:

What the 414 Request-URI Too Large Error Is (And Why It Happens)

The 414 Request-URL Too Large error is a configuration issue. It’s one of the 400 error codes. They’re troublesome because it often means there’s a critical issue somewhere between your browser and a server.

In this case, a 414 error means that the URL is too long for the server to process, so it throws an exception. This could be an issue when using Urchin Tracking Module (UTM) codes to track conversions. These links can get long depending on the parameters you set, and if they reach the maximum limit of your site’s configuration, you’ll see the error.

As with many WordPress errors, there are many more things going on under the hood to cause a 414. In fact, you can group the causes into three distinct areas:

  • Converting a POST request to a GET request with query information that is too long. This is a developer-specific issue that happens at the coding level.
  • A redirect loop. We’ve talked about the best practices for redirects in a previous post. If you get into a redirect loop, the resulting URLs get too long, and the error will appear.
  • The server could be under attack, and a 414 error at this point will be the least of your worries.

Before we move on, it’s worth noting that for all intents and purposes, a URI and a URL are the same things. While there are some distinct differences between the two, we’re going to use “URL” here to keep things straightforward.

Ever seen this error pop up? 😅 Tackle it with no fear thanks to this guide 💪Click to Tweet

What You’ll Need to Fix the 414 Request-URI Too Large Error

If you’ve encountered the 413 Request Entity Too Large error in the past, you’ll find a 414 error to be similar. Of course, the names show their similarities, as they’re next to each other in the official standards and have almost identical descriptions.

Given this, the list of tools and skills you’d use for fixing a 413 will be the same for a 414 too:

  • Administrative access to your server
  • One of the many Secure File Transfer Protocol (SFTP) clients available
  • The right skills to use SFTP and navigate your server
  • A clean and current backup on hand in case you need to restore
  • A text editor, though this might not be necessary for you

If you’re a Kinsta customer, you’ll find your SFTP credentials within the MyKinsta dashboard, along with some other handy functionality to get into your server:

The SFTP panel in the MyKinsta dashboard.

The SFTP panel in the MyKinsta dashboard.

It’s also worth noting that we will connect through SFTP here because it’s more secure (hence the name).

What to Do Before You Begin Resolving the 414 Request-URI Too Large Error

Before you crack open the hood on your server and set it to work, you may want to carry out some “pre-steps” first. It could be that there’s a simple workaround that doesn’t involve you tinkering with your configuration files.

What’s more, these checks should be carried out at some point regardless, so getting them taken care of now will help in the long run.

First, a WordPress plugin might generate long URLs as part of its functionality. Full-featured, all-in-one security plugins can be a prime candidate here, especially if they offer lots of functionality.

It’s hard to know at a glance whether a plugin could be at fault, but it’s worth investigating its specific settings for a dedicated option to restrict the length of URLs. If so, toggling this could solve the 414 error within seconds.

Under normal circumstances, though, there are a few other tasks you can carry out to help you diagnose the error:

  • Check your server logs for mentions of the error or any other identifying entries.
  • Your browser developer tools may give you some indication of the error’s cause — especially your Console.
  • Reach out to the site owner or developer (if it’s not you) and let them know the error exists. It could be that they will have a fix or can advise you further on what to do.

Of course, you may want to contact both the site and plugin developers anyway if you’ve found that a plugin is at fault. Even so, if you’ve exhausted all of your outreach and top-level checks, it’s time to venture on.

How to Fix the 414 Request-URI Too Large Error (In 3 Steps)

Once you have your tools together, you’ll need a plan. The fix for the 414 Request-URI Too Large error is to alter a server configuration file. As such, there are three steps you can take.

Let’s start by getting into your server and figuring out which type of server you have.

1. Log In to Your Server (And Determine Your Server Type)

You have to get into the server before you work on it, and this is where your SFTP skills come into play.

We’ve outlined how to get into your site through SFTP in the past, and once you’re in, you’ll need to figure out what type of server you have. There are two main types: Apache and Nginx.

It could be that you already know which server type you run. If so, you can skip to the next step.

If you’re struggling, here’s a quick tip: look for a .htaccess file. It’s found in the root of your server, and if you can see it, this means you’re running an Apache server. Nginx servers use a different configuration file.

That said, it could be that you’re running an Apache server that doesn’t yet have a .htaccess file. As such, there are two other methods you could use:

  • Carry out a domain lookup using the Whois Domain Tools site: This might tell you the type of server you’re using, although it’s not a foolproof method.
  • Check with your hosting provider about the server type you use. Of course, your host is going to know what server you run. Kinsta customers will always use Nginx servers, although other providers may use Apache or a mix. It’s best to open a ticket with your host to check before you poke around in your site’s backend.

When you’ve determined which type of server you use, you can head onto the next step and find your configuration file.

2. Find the Server Configuration File and Open It in Your Text Editor

As we noted, Apache servers use a .htaccess file for basic server configuration, and it will be located in your root directory. This isn’t the file you need to fix the 414 Request-URI Too Large error, though.

In this case, you’ll need to go deeper into your advanced configuration settings. These are found not at your site’s root folder but the server’s root.

When you log into your site through SFTP, you’ll often come to a directory that contains all of your sites (along with some other files). In many cases, you can go up a couple of levels to a server root directory:

Navigating to the server root in Cyberduck.

Navigating to the server root in Cyberduck.

This will give you a few more directories to traverse. Among them will be the etc folder:

The etc folder within a server root directory.

The etc folder within a server root directory.

The full path of the configuration file will be /etc/apache2/apache2.conf.

The Apache configuration file.

The Apache configuration file.

For Nginx servers, the process is similar. It’s one we’ve covered in part within our article on adjusting the maximum upload size in WordPress. The path to the configuration file will be /etc/nginx/nginx.conf.

Once you’ve located your file, open it in your favorite text editor. At this point, you’re ready to adjust it.

3. Adjust the Configuration File To Allow for Longer URLs

Much like how Apache and Nginx servers have different configuration files, they also have different settings to adjust. Regardless of your server type, though, you’ll need to open it in an editor if you haven’t already done so. Our preferred approach is to download the file to your computer, work on it, and upload it back to the server.

For Apache configuration files, look for the LimitRequestLine setting, or add it to the bottom of your file if it’s not there:

Changing the Apache server configuration settings.

Changing the Apache server configuration settings.

For the value, use at least 128000. If you need to go higher than this, keep to multiples of two (i.e. the next value should be 256000).

For Nginx servers, you’re looking for the large_client_header_buffers setting. Here, you’ll see two values relating to number and size. For example, large_client_header_buffers 4 8K. The only figure you need to alter here is the size — you can go from 8K to around 128K, although you may need to increase this further (again in multiples of two).

Once you’re done, save your changes and upload your configuration file back to your server. At this point, check your site again, and the 414 Request-URI Too Large error should have gone.

The 414 Request-URI Too Large error may be annoying, but luckily, it tells you exactly what the problem is. 🤷‍♀️ Learn how to fix it here 👇Click to Tweet

Summary

WordPress errors often have a similar approach for resolving them. You’ll often need to diagnose the error first, though. In the case of the 414 Request-URI Too Large error, the problem is clear: the URLs being passed to the server are too big.

To fix it, you’ll need to change your Apache or Nginx server settings. This doesn’t take too long, and once you’re done, you should be back up and running. While we can’t speak for other hosts, Kinsta’s support team is on hand 24/7 to help you get over the 414 Request-URI Too Large error if you’re stuck. In fact, we’re here whenever you need our help and guidance, so you can get back to running your site.


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.

Ошибка 414. Причины ее возникновения и возможные решения

Ошибка 414 или Error 414 Request URI Too Large — почему она возникает и как ее устранить простому пользователю или владельцу собственного сайта. Начнем с того, что это довольно редкая, не распространенная ошибка. В оригинале ее название — Request URI Too Large.

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

Стоит заметить, что любой запрос условно делится на две составляющие:

  • Заголовок;
  • Тело.

В нормальных условиях в заголовке содержится только общая информация. Это значит, что он по своей природе не может быть слишком длинным. Тело же в свою очередь наоборот содержит всю основную часть запроса. Каким бы длинным и ёмким не было тело, сервер воспринимает это за норму и ошибка 414 не должна возникать. Так что в большинстве случаев причиной данной неполадки является именно заголовок и сбои в нем.

Обычному пользователю никак. Если во время сёрфинга в Интернете вы столкнулись с этой нераспространенной проблемой, вы абсолютно бессильны. Нужно просто ждать, пока администраторы злосчастной страницы исправят ситуацию. Единственное, что доступно обычному пользователю – написание запроса в техническую поддержку.

Каковы действия должен совершить владелец сайта для того, чтобы исправить ошибку 414?

  1. Попытаться исключить ошибку непосредственно в коде ресурса.
  2. Сделать больше допустимый размер заголовка. За это отвечает 3 параметра, которые необходимо разместить в http:
  • сlіеnt_bоdу_buffеr_sіzе — отвечает за размер тела;
  • сlіеnt_hеаdеr_buffеr_sіzе — отвечает за обычные заголовки;
  • lаrgе_clіеnt_hеаdеr_buffеrs — отвечает за большие заголовки.

В случае с ошибкой 414 нам необходимо работать с последней строкой. Стандартно размер заголовка = 8kb. Вносим изменения в последнюю строку – дописываем 8 (пробел) 64k. Точно такие же исправления необходимо сделать в каждой строке перед секцией под названием «сервер». Теперь перезагружаем ресурс, ошибка 414 должна уйти. Если нет, то это означает, что вы сделали что-то неправильно.

Напоследок хотелось бы заметить, что если вы совсем не разбираетесь в системе nginx, то не делайте никаких изменений самостоятельно. Так вы не только не решите проблему, но и рискуете встретиться с другими ошибками в дальнейшем. В таком случае лучше обратиться к специалистам, для них справиться с этим не составит особого труда.

Дальше по теме…

В этой статье представлен номер ошибки Ошибка 414, широко известный как URI запроса слишком длинный, описанный как Введенный вами адрес веб-сайта (URI) слишком длинный для сервера.

О кодах состояния

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

Чтобы объяснить проблему подробнее, вот несколько полезных сведений о кодах веб-ошибок, их симптомах, причинах и методах устранения.

Определения (Бета)

Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!

  • Запрос — запрос — это сообщение, отправленное источником другому объекту.
  • Сервер — сервер — это работающий экземпляр программного приложения, способного принимать запросы от клиента и соответственно давать ответы.
  • Uri — унифицированный идентификатор ресурса или URI — это строка символов, используемая для идентификации имени или ресурса
  • Веб-сайт — НЕ ИСПОЛЬЗУЙТЕ
  • Длинное . Длинное целое число — это целое число, обычно вдвое превышающее размер стандартного. целое число
Симптомы Ошибка 414 — URI запроса слишком длинный

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

4xx: Ошибка клиента
Эта ошибка отправляется обратно пользователю, если это ошибка на стороне клиента. Пользователь получает уведомления о плохом запросе, о том, что содержимое не найдено, о несанкционированном доступе к содержимому или что-то в этом роде.

400 — Плохой запрос

401 — Неавторизованный доступ

402 — Требуется оплата

403 — Запрещено

404 — Не найдено

405 — Метод не разрешен

406 — Не принято

407 — Требуется прокси-аутентификация

408 — Таймаут запроса

409 — Конфликт

410 — Пропал

411 — Требуется длина

412 — Предварительное условие не выполнено

413 — Request Entity Too Large

414 — Request-URI Too Long

415 — Неподдерживаемый тип носителя

416 — Диапазон запроса не удовлетворен

417 — Ожидание не выполнено

Fix URI запроса слишком длинный (Error Ошибка 414)
(Только для примера)

Причины URI запроса слишком длинный — Ошибка 414

Коды 4XX возникают по вине пользователя или настроек со стороны пользователя. Запрос не был понят сервером из-за неправильного ввода адресной строки, неправильного синтаксиса, нестабильного соединения или ошибочной ОС.

Методы устранения

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

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

Обратите внимание: ни ErrorVault.com, ни его авторы не несут ответственности за результаты действий, предпринятых при использовании любого из методов ремонта, перечисленных на этой странице — вы выполняете эти шаги на свой страх и риск.

Метод 2 — Проверить журналы

  • Если вы хотите проверить файлы журналов, вы можете сделать это, сначала убедившись, что вы вошли на компьютер веб-сервера как администратор.
  • Нажмите «Пуск», затем «Настройка», затем нажмите «Панель управления».
  • Откройте Инструменты администратора и дважды щелкните Диспетчер служб Интернета.
  • Выберите веб-сайт из списка различных обслуживаемых сайтов.
  • Щелкните веб-сайт правой кнопкой мыши и затем наведите указатель мыши на «Свойства».
  • Выберите вкладку «Веб-сайт» и нажмите «Свойства». На нем вы увидите вкладку Общие свойства. Внизу окна вы можете увидеть расположение сгенерированных файлов журнала.
  • Открывайте файлы журналов с помощью WordPad, любого средства просмотра текстовых файлов или Microsoft Word.
  • Здесь вы сможете проанализировать, где возникли ошибки при доступе к серверу.

Метод 5 — Удалить расширения

  • Иногда дополнительные расширения могут выдавать коды веб-ошибок.
  • Удалите недавно установленные расширения, зайдя в настройки браузера и нажав «Дополнительные инструменты».
  • Вы увидите расширения, которые не были установлены в вашем браузере, выберите последнее дополнение, которое, как вы подозреваете, вызвало возникшую у вас проблему.

Метод 1 — Очистить кеш браузера

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

  • В Google Chrome
    • Откройте Chrome и нажмите три точки в правом верхнем углу браузера.
    • Нажмите Дополнительные инструменты , а затем нажмите Очистить данные просмотра .
    • Вы можете удалить все или только определенный период просмотра.
    • Установите флажки рядом с файлами cookie и другими данными сайта и кэшированными изображениями и файлами .
    • Наконец, нажмите Очистить данные .
  • На краю
    • Нажмите … это крайняя правая кнопка под кнопкой закрытия.
    • Прокрутите вниз и нажмите «Настройки».
    • Найдите пункт «Очистить данные просмотра» и нажмите кнопку «Выбрать, что очистить».
    • Это даст вам возможность выбрать, какой тип данных вы хотите очистить, просто поставьте галочку на тех элементах, которые хотите включить, затем нажмите «Очистить».
  • В Mozilla
    • Перейдите в меню «История» и выберите «Очистить недавнюю историю».
    • Вы можете нажать кнопку Alt, если строка меню скрыта.
    • Вы увидите раскрывающееся меню, в котором вы можете выбрать период или диапазон, который хотите удалить, и щелкните свой выбор.
    • Вы можете нажать «Подробности», чтобы выбрать, что нужно очистить, будь то весь кеш или другие элементы.
    • После выбора нажмите «Очистить сейчас» и перезагрузите браузер, чтобы изменения вступили в силу.

Метод 3 — Проверить запрошенный URL

  • Бывают случаи, когда вы вручную вводите URL-адрес сайта, который хотите изучить. Если после этого вы получаете ошибки, проверьте URL-адрес, который вы только что ввели в адресной строке, если вы действительно получаете доступ к правильному адресу. Если нет, исправьте элементы, которые вы ввели неправильно.

Метод 4 — Удалить последние обновления

Для Windows 7

  • Найдите обновления Windows в строке поиска.
  • Нажмите «Ввод», когда он появится в результатах поиска.
  • Проверьте последние обновления и нажмите Удалить обновления в те дни, когда возникла ошибка.

Для Windows 8 и Windows 10

  • Нажмите одновременно кнопку окна и букву X, чтобы открыть настройки.
  • Когда вы перейдете к настройкам Windows, нажмите «Обновление и безопасность».
  • Нажмите «Просмотреть историю установленных обновлений», а затем «Удалить обновления».

Метод 6 — Проверить конфигурацию сервера

  • Устранением неполадок обычно занимается администратор сайта. Если это вы, то вам необходимо иметь представление о конфигурации веб-сервера.
  • Вы можете проверить, на каком веб-сервере работает ваш сайт, с помощью средств проверки URL или домена. Вам просто нужно ввести адрес сайта и проанализировать результаты, которые вы получите.
  • Вы также можете проверить неработающие ссылки, щелкнув веб-страницу правой кнопкой мыши и выбрав «Проверить». Это должно дать вам код сайта справа. Вы можете проверить каждый якорный текст и убедиться, что связанные с ними ссылки все еще активны.

Метод 7 — Другие техники

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

How to fix Error 414 (Request URI Too Long) — The website address (URI) you entered was too long for the server.
Wie beheben Fehler 414 (Anfrage-URI zu lang) — Die von Ihnen eingegebene Website-Adresse (URI) war für den Server zu lang.
Come fissare Errore 414 (Richiesta URI troppo lungo) — L’indirizzo del sito web (URI) che hai inserito era troppo lungo per il server.
Hoe maak je Fout 414 (Verzoek URI te lang) — Het websiteadres (URI) dat u heeft ingevoerd, was te lang voor de server.
Comment réparer Erreur 414 (Demande URI trop long) — L’adresse du site Web (URI) que vous avez saisie était trop longue pour le serveur.
어떻게 고치는 지 오류 414 (요청 URI가 너무 깁니다.) — 입력한 웹사이트 주소(URI)가 서버에 비해 너무 깁니다.
Como corrigir o Erro 414 (Solicitação URI muito longa) — O endereço do site (URI) inserido é muito longo para o servidor.
Hur man åtgärdar Fel 414 (Begäran URI är för lång) — Webbplatsadressen (URI) du angav var för lång för servern.
Jak naprawić Błąd 414 (Żądanie URI zbyt długie) — Wprowadzony adres witryny (URI) jest za długi dla serwera.
Cómo arreglar Error 414 (Solicitar URI demasiado largo) — La dirección del sitio web (URI) que ingresó era demasiado larga para el servidor.

The Author Об авторе: Фил Харт является участником сообщества Microsoft с 2010 года. С текущим количеством баллов более 100 000 он внес более 3000 ответов на форумах Microsoft Support и создал почти 200 новых справочных статей в Technet Wiki.

Следуйте за нами: Facebook Youtube Twitter

Последнее обновление:

26/10/22 12:19 : Пользователь Windows 10 проголосовал за то, что метод восстановления 5 работает для него.

Рекомендуемый инструмент для ремонта:

Этот инструмент восстановления может устранить такие распространенные проблемы компьютера, как синие экраны, сбои и замораживание, отсутствующие DLL-файлы, а также устранить повреждения от вредоносных программ/вирусов и многое другое путем замены поврежденных и отсутствующих системных файлов.

ШАГ 1:

Нажмите здесь, чтобы скачать и установите средство восстановления Windows.

ШАГ 2:

Нажмите на Start Scan и позвольте ему проанализировать ваше устройство.

ШАГ 3:

Нажмите на Repair All, чтобы устранить все обнаруженные проблемы.

СКАЧАТЬ СЕЙЧАС

Совместимость

Требования

1 Ghz CPU, 512 MB RAM, 40 GB HDD
Эта загрузка предлагает неограниченное бесплатное сканирование ПК с Windows. Полное восстановление системы начинается от $19,95.

ID статьи: ACX01634RU

Применяется к: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Совет по увеличению скорости #40

Использование утилит настройки RAM, GPU и CPU:

Если вы опытный пользователь, вы можете использовать различные бесплатные утилиты настройки для оптимизации вашей оперативной памяти, видеокарты и процессора. Настройте параметры, скорость и синхронизацию этих важных компонентов вашего компьютера, чтобы получить лучшую скорость и максимальную производительность. Некоторые из этих полезных инструментов включают MSI Afterburner, CPUID, Intel XTU и AMD Catalyst.

Нажмите здесь, чтобы узнать о другом способе ускорения работы ПК под управлением Windows


Ошибки в алфавитном порядке:  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Логотипы Microsoft и Windows® являются зарегистрированными торговыми марками Microsoft. Отказ от ответственности: ErrorVault.com не связан с Microsoft и не заявляет о такой связи. Эта страница может содержать определения из https://stackoverflow.com/tags по лицензии CC-BY-SA. Информация на этой странице представлена исключительно в информационных целях. © Copyright 2018

Ошибка 414 Request URI Too Large возникает в тех случаях, когда веб-сервер не способен обслужить запрос от клиента (т.е. веб-браузера или робота), потому что запрашиваемый URI (Request URI) длиннее, чем сервер может интерпретировать. Говоря простым языком, запрашиваемый веб-адрес слишком длинный, то есть содержит слишком много байтов.

Помогаем

Unrecognizable

Обычно в настройках веб-сервера заданы довольно широкие лимиты на длину URL-адресов, от 2k и вплоть до 8k символов. В Nginx задается число и размер буферов, а в Apache – размер запроса заголовка.

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

В качестве примера воспользуемся Nginx. Необходимо в файле конфигурации nginx.conf, который обычно расположен в /etc/nginx/nginx.conf добавить или изменить в секции server или http и https строчку: large_client_header_buffers 4 16k  — изменение количества и размера буферов

Здесь 16k байт и будет желаемым размером URL-адреса, а 4 — количеством желаемых буферов. В данному случае размер буферов более важен, чем их количество, так что в большинстве случаев параметр 4 будет оптимальным.

Ставайте досвідченим фахівцем з фінансів на рівні директора!

РЕЄСТРУЙТЕСЯ!

Chief financial officer

Для настройки сервера на базе Apache меняем параметр LimitRequestFieldSize в файле конфигурации на желаемое значение (в байтах).

Длина URI не предусмотрена спецификацией

Протокол HTTP не ограничивает длину URI, так что сервер должен иметь возможность обработать любой запрос, даже с использованием метода GET. Но важно учитывать, что ограничение длины накладывают браузеры, под которые и нужно подстраиваться.

Решение проблемы методом POST

Справедливости ради стоит отметить, что метод реконфигурации веб-сервера не является идеальным. В большинстве случаев лучше разделить запрос на части и отправить их с помощью AJAX, к примеру. Но и такой способ может не подойти, если запрос нельзя разбивать или его отправляет библиотека JavaScript от третьей стороны. Повышение лимита длины запроса в настройках веб-сервера будет самым простым, но не единственным методом решения ошибки 414.
Руководство по Apache говорит нам, что «в нормальных условиях величина LimitRequestFieldSize не должна изменяться». Так что, вероятнее всего, вы злоупотребляете методом GET, который стоит заменить на POST.

GET против POST

Пара переменной и ее значения в GET передается через URL-запрос:

GET /blog/?name1=value1&name2=value2 HTTP/1.1
Host: ruhighload.com

пример GET-запроса

Тогда как в POST она передается в теле самого заголовка:

POST /blog/ HTTP/1.1
Host: ruhighload.com
name1=value1&name2=value2

пример POST-запроса

Метод POST имеет ряд преимуществ перед GET: он более защищен, ведь большая часть запроса скрыта от пользователя; подходит для операций с большими данными.

Самое главное

Для того, чтобы справиться с ошибкой 414 Request URI Too Large нужно всего-лишь знать азы. Самыми простыми способами ее решением будут реконфигурация веб-сервера или использование метода POST вместо GET.

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


Ex Номер ошибки: Ошибка HTTP 414
Название ошибки: Request URI Too Long
Описание ошибки: The website address (URI) you entered was too long for the server.
Разработчик: Microsoft Corporation
Программное обеспечение: Windows Operating System
Относится к: Windows XP, Vista, 7, 8, 10, 11

Такие проблемы Request URI Too Long обычно вызваны повреждением файла, связанного с Edge, или, в некоторых случаях, его случайным или намеренным удалением. Как правило, самый лучший и простой способ устранения ошибок, связанных с файлами Windows 10, является замена файлов. В качестве последней меры мы рекомендуем использовать очиститель реестра для исправления всех недопустимых Request URI Too Long, расширений файлов Windows 10 и других ссылок на пути к файлам, по причине которых может возникать сообщение об ошибке.

Типичные ошибки Request URI Too Long

Вопросы, связанные с Request URI Too Long и Edge:

  • «Ошибка в файле Request URI Too Long.»
  • «Request URI Too Long отсутствует или перемещен. «
  • «Отсутствует файл: Request URI Too Long»
  • «Не удалось загрузить модуль для Request URI Too Long. «
  • «Отсутствует модуль: не удалось зарегистрировать Request URI Too Long»
  • «Ошибка времени выполнения Request URI Too Long. «
  • «Ошибка загрузки: Request URI Too Long. «

Обычно ошибки Request URI Too Long с Edge возникают во время запуска или завершения работы, в то время как приложения, связанные с Request URI Too Long, выполняются, или редко во время последовательности обновления ОС. Отслеживание ошибок Request URI Too Long, связанных с Edge, имеет решающее значение для обнаружения неисправностей и ретрансляции обратно в Microsoft Corporation для параметров восстановления.

Создатели Request URI Too Long Трудности

Проблемы Edge и Request URI Too Long возникают из отсутствующих или поврежденных файлов, недействительных записей реестра Windows и вредоносных инфекций.

В основном, осложнения Request URI Too Long из-за:

  • Недопустимый раздел реестра Request URI Too Long (или поврежденный).
  • Зазаражение вирусом повреждает файл Request URI Too Long.
  • Request URI Too Long злонамеренно удален (или ошибочно) другим изгоем или действительной программой.
  • Другая программа находится в конфликте с Edge и его общими файлами ссылок.
  • Request URI Too Long поврежден во время загрузки или установки программного обеспечения.

Продукт Solvusoft

Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

Коды состояний браузера в базе знаний

Идентификатор статьи:

120632

Автор статьи:

Последнее обновление:

Популярность:

star rating here

Загрузка (Исправление ошибки)


Based on John’s answer, I changed the GET request to a POST request. It works, without having to change the server configuration. So I went looking how to implement this. The following pages were helpful:

jQuery Ajax POST example with PHP
(Note the sanitize posted data remark) and

http://www.openjs.com/articles/ajax_xmlhttp_using_post.php

Basically, the difference is that the GET request has the url and parameters in one string and then sends null:

http.open("GET", url+"?"+params, true);
http.send(null);

whereas the POST request sends the url and the parameters in separate commands:

http.open("POST", url, true);
http.send(params);

Here is a working example:

ajaxPOST.html:

<html>
<head>
<script type="text/javascript">
    function ajaxPOSTTest() {
        try {
            // Opera 8.0+, Firefox, Safari
            ajaxPOSTTestRequest = new XMLHttpRequest();
        } catch (e) {
            // Internet Explorer Browsers
            try {
                ajaxPOSTTestRequest = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    ajaxPOSTTestRequest = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {
                    // Something went wrong
                    alert("Your browser broke!");
                    return false;
                }
            }
        }

        ajaxPOSTTestRequest.onreadystatechange = ajaxCalled_POSTTest;
        var url = "ajaxPOST.php";
        var params = "lorem=ipsum&name=binny";
        ajaxPOSTTestRequest.open("POST", url, true);
        ajaxPOSTTestRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        ajaxPOSTTestRequest.send(params);
    }

    //Create a function that will receive data sent from the server
    function ajaxCalled_POSTTest() {
        if (ajaxPOSTTestRequest.readyState == 4) {
            document.getElementById("output").innerHTML = ajaxPOSTTestRequest.responseText;
        }
    }
</script>

</head>
<body>
    <button onclick="ajaxPOSTTest()">ajax POST Test</button>
    <div id="output"></div>
</body>
</html>

ajaxPOST.php:

<?php

$lorem=$_POST['lorem'];
print $lorem.'<br>';

?>

I just sent over 12,000 characters without any problems.

Как исправить.Есть несколько способов избежать слишком длинных URL-адресов:При использовании динамических URL-адресов с параметрами URL,используйте серверную перезапись URL-адресов для преобразования их в статические,читаемые человеком URL-адреса.Старайтесь минимизировать количество параметров в URL,когда это возможно.

Код состояния ответа HTTP 414 URI Too Long указывает на то,что URI,запрошенный клиентом,длиннее,чем сервер готов интерпретировать.

В случае ошибки 414 Request-URI Too Large проблема ясна: URL-адреса, передаваемые на сервер, слишком велики. Чтобы исправить это, вам нужно изменить настройки сервера Apache или Nginx. Это не займет много времени, и как только вы закончите, вы должны вернуться к работе.

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

Универсальный идентификатор ресурса (URI)-это член этого универсального набора имен в зарегистрированных пространствах имен и адресов,ссылающихся на зарегистрированные протоколы или пространства имен.

Ошибка 414 Request URI Too Large возникает в тех случаях, когда веб-сервер не способен обслужить запрос от клиента (т.е. веб-браузера или робота), потому что запрашиваемый URI (Request URI) длиннее, чем сервер может интерпретировать. Говоря простым языком, запрашиваемый веб-адрес слишком длинный, то есть содержит слишком много байтов.

Так что если адрес верный и не содержит лишнего мусора, то самым простым способом решения проблемы будет реконфигурация веб-сервера. В качестве примера воспользуемся Nginx. Необходимо в файле конфигурации nginx.conf, который обычно расположен в /etc/nginx/nginx.conf добавить или изменить в секцииserver или http и https строчку:
large_client_header_buffers 4 16k

Здесь 16k байт и будет желаемым размером URL-адреса, а 4 — количеством желаемых буферов. В данному случае размер буферов более важен, чем их количество, так что в большинстве случаев параметр 4 будет оптимальным.

Для настройки сервера на базе Apache меняем параметр LimitRequestFieldSize в файле конфигурации на желаемое значение (в байтах).

Длина URI не предусмотрена спецификацией

Протокол HTTP не ограничивает длину URI, так что сервер должен иметь возможность обработать любой запрос, даже с использованием метода GET. Но важно учитывать, что ограничение длины накладывают браузеры, под которые и нужно подстраиваться.

Источник


If you request a very large URL in Apache web server, then it may give “414 Request URI too large” error message. By default, Apache supports URLs with up to 8177 characters, but sometime users even get error with ~4000 characters in URL. In this article we will look at how to fix 414 request URI too large error in Apache.

By default, Apache server supports up to 8177 characters in a URL. However, if you need to request large URLs, or are getting errors with smaller URLs itself, then you need to increase the request size limit in Apache.

You can do this by setting LimitRequestLine and LimitRequestFieldSize directives.

1. Open Apache Configuration File

Apache configuration file is located at one of the following locations, depending on your Linux distribution.

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /etc/httpd/conf/httpd.conf

Open terminal and run the following command to open Apache configuration page.

$ sudo vi /etc/httpd/conf/httpd.conf

If you make changes in Apache server configuration file, it will be applicable for all websites/domains that you run on your Apache web server.

Also read : How to Enable Apache Server Status Dashboard

Apache Restrict Access by IP in Virtual Host

If you are running multiple websites on Apache server, using virtual host, then open the virtual host configuration file of the website (e.g www.website.com) for which you want to deny access to IP. Let’s say your virtual host configuration file is located at /etc/apache2/sites-enabled/website.conf

$ sudo vi /etc/apache2/sites-enabled/website.conf

Also read : Apache Restrict Access to URL by IP

2. Increase URI limit

To fix 414 Request URI too large error, you need to set LimitRequestLine directive.

If you want to increase URL limit to 10000 characters (bytes), add the following lines to your server configuration or virtual host file.

LimitRequestLine 10000

If you also want to increase maximum header length supported by Apache to 4000 characters, then add the following line to server configuration or virtual host file.

LimitRequestFieldSize 4000

Basically, you need to specify the required number of bytes after LimitRequestLine and LineRequestFieldSize directives.

Also read : How to Enable HTTP2 in Apache

3. Restart Apache web server

Restart Apache web server to apply changes.

# service httpd restart
OR 
# systemctl restart httpd
OR
# sudo service apache2 restart

Now when a user tries to request a long URL they will not get “414 Request URI too long” error.

Ubiq makes it easy to visualize data in minutes, and monitor in real-time dashboards. Try it today!

Related posts:

  • About Author

mm

Понравилась статья? Поделить с друзьями:
  • Как исправить ошибку 410
  • Как исправить ошибку маршрутизатора
  • Как исправить ошибку 408
  • Как исправить ошибку манифеста
  • Как исправить ошибку майнкрафт out of memory