peteeckel/netbox-plugin-dns

Bulk import of CSV or JSON file fails with 413 Payload To Large error

Closed this issue · 3 comments

I receive a 413 "Payload To Large" error when attempting a bulk import of a file (CSV or JSON format) DNS records into NetBox. While this may be related to the server's http proxy settings, does the DNS plugin have a default maximum payload size value? If so can the the maximum payload size value be increased in the Django configuration file?

$ ls -hl dc6-prod_records_dns.csv
55M May 23 12:19 dc6-prod_records_dns.csv

$ wc -l dc6-prod_records_dns.csv
727603 dc6-prod_records_dns.csv

Hi @KE8SOJ, that's not a NetBox DNS issue (nor NetBox, by the way), not even Django - it's your web server/reverse proxy config.

Are you using Apache or Nginx?

You can find instructitions for properly configuring Apache or Nginx here (and in about a million other places, if you know what to look for :-))

Update: There actually is a limit in Django, with a config setting in NetBox, which is 2.5 MB (2621440 bytes) by default. It was introduced in NetBox version 3.6. See the Django documentation

You can increase DATA_UPLOAD_MAX_MEMORY_SIZE in configuration.py and restart the netbox and netbox-rq services. Setting it to None disables the check.