Z
Zerops4mo ago
minsomai

414 Request-URI Too Large from Nginx

this is in project skypayload, I need support for very large query string in URL. I don't know how to configure nginx for nodejs service.
No description
16 Replies
Aleš
Aleš4mo ago
is that Zerops subdomain or your own domain?
minsomai
minsomaiOP4mo ago
our own
Jan Saidl
Jan Saidl4mo ago
Hi @minsomai, the default nginx settings are:

client_header_buffer_size 1k;
large_client_header_buffers 4 8k;

client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
It's not currently possible to change the configuration. However, it will be possible to change the nginx settings soon.
minsomai
minsomaiOP4mo ago
thank you
Jan Saidl
Jan Saidl4mo ago
What values would your application need?
minsomai
minsomaiOP4mo ago
its showing 11KB ^ @Jan Saidl we might need more If I host in ubuntu instaead of nodejs service, I can configure this myself?
Jan Saidl
Jan Saidl4mo ago
No, switching to Ubuntu won't help. This is a configuration limitation of Nginx, which is at the project's entry point. I'll try to manually change it on your project now to see if it helps. If it does, I'll try to come up with a permanent solution. I set it to 16k instead of 8k, can you please try it?
client_header_buffer_size 1k;
large_client_header_buffers 4 16k;
client_header_buffer_size 1k;
large_client_header_buffers 4 16k;
minsomai
minsomaiOP4mo ago
nop not working
Jan Saidl
Jan Saidl4mo ago
All right, another try:
client_header_buffer_size 16k;
large_client_header_buffers 4 16k;
client_header_buffer_size 16k;
large_client_header_buffers 4 16k;
minsomai
minsomaiOP4mo ago
nop
Jan Saidl
Jan Saidl4mo ago
I can see it in the log. Okay, so I've set really big values. Can you try it now, please?
client_header_buffer_size 52k;
large_client_header_buffers 4 52k;
client_header_buffer_size 52k;
large_client_header_buffers 4 52k;
minsomai
minsomaiOP4mo ago
nop. I can DM you curl, LMK
Jan Saidl
Jan Saidl4mo ago
Yes please Hi @minsomai , after some experimentation I think that the correct values will solve this problem. I am currently working on a solution that will allow you to set this on your project.
minsomai
minsomaiOP4mo ago
thank you @Jan Saidl looking forward to it
Jan Saidl
Jan Saidl3mo ago
Hi @minsomai we finally released a new feature and now you can customize the l7 balancer configuration. Unfortunately the frontend is not ready yet, but you can make the change via API. After the change, you still need to make any change in http routing - for example enable subdomain. If there is any problem I can do the setup for you.
#!/bin/bash

TOKEN="TOKEN"
PROJECT_ID="9B1PKugxQsmhCBAkSmjq0w"

# read current configuration
curl "https://api.app-prg1.zerops.io/api/rest/public/project/${PROJECT_ID}/l7httpbalancer-config" -H "authorization: Bearer $TOKEN"

# upsert value
curl -XPUT "https://api.app-prg1.zerops.io/api/rest/public/project/${PROJECT_ID}/l7httpbalancer-config" \
-H "authorization: Bearer $TOKEN" \
--data-raw '{"values":[{"name": "client_header_buffer_size", "value": "52k"},{"name": "large_client_header_buffers_number", "value": "20"}, {"name":"large_client_header_buffers_size","value": "52k" }]}'
#!/bin/bash

TOKEN="TOKEN"
PROJECT_ID="9B1PKugxQsmhCBAkSmjq0w"

# read current configuration
curl "https://api.app-prg1.zerops.io/api/rest/public/project/${PROJECT_ID}/l7httpbalancer-config" -H "authorization: Bearer $TOKEN"

# upsert value
curl -XPUT "https://api.app-prg1.zerops.io/api/rest/public/project/${PROJECT_ID}/l7httpbalancer-config" \
-H "authorization: Bearer $TOKEN" \
--data-raw '{"values":[{"name": "client_header_buffer_size", "value": "52k"},{"name": "large_client_header_buffers_number", "value": "20"}, {"name":"large_client_header_buffers_size","value": "52k" }]}'

Did you find this page helpful?