Report this

What is the reason for this report?

413 Request line is too large

Posted on January 3, 2021

Hi,

I have successfully built my app through the new app creation process. ITs a Django App. Everything works fine, but for some page I get a Bad Request / Request Line is too large error.

I understand that I need to increase some parameters in the Nginx.conf file, but how do I access that in a deployed app? As the console is read only and I can’t ssh in?

Thanks, Fred



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

In the current App Platform setup, you’re not able to directly edit the nginx.conf file as the environment is managed by DigitalOcean. However, we can find a solution to your problem. This error typically means that the URL you’re trying to access is too long. You may want to consider reducing the length of your URLs if possible.

If reducing the URLs isn’t an option, you may need to take advantage of DigitalOcean’s Droplet service where you have full control over the server configuration. In this case, you can manage your nginx.conf file as per your needs.

To guide you on setting up Django App on a droplet, refer to our Django with Postgres, Nginx, and Gunicorn on Ubuntu 20.04 Tutorial.

For more information on comparing services, check our docs on App platform and on Droplets.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.