-
Self troubleshooting
Version1.10.3 DescriptionI'm getting 414 errors when shortening very long URLs (in my case about 7000 characters) via API POST requests. Expected BehaviorNo response Steps to Reproduce
ContextNoticed in #3065 this should work but it seems be an issue for me. I can use DBeaver to edit the database directly and it saves / redirects fine. Wondering if this is because I'm running it via Cloudron's YOURLS package or if it's because I'm using n8n to make the request or if this is an upstream issue. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
This seems well outside of YOURLS and its stack. You're getting an nginx error message, but Cloudron builds its YOURLS container using Apache. Do you have an nginx reverse proxy in front of your Cloudron apps? That would be where to start. |
Beta Was this translation helpful? Give feedback.
-
|
A 414 URI Too Large error means the web server is rejecting the request before it ever reaches YOURLS — so this is not a YOURLS bug and not specific to Cloudron's package or n8n. The request is being cut off at the HTTP server layer. Why this happens414 is a server-level HTTP status code meaning the request URI exceeded the server's configured maximum length. Even though you are sending a POST request (where the long URL is in the request body, not the URI), the 414 can still occur in two scenarios:
Since you mention n8n is making the request, the most likely cause is that n8n is constructing the API call with the URL as a query string parameter rather than a POST body field — which turns a POST into a request with a very long URI line that the server rejects. Step 1 — Verify how n8n is sending the requestCheck your n8n HTTP Request node configuration. The YOURLS API requires parameters to be sent as form-encoded POST body fields, not as query string parameters: Correct (POST body): Incorrect (query string — causes 414): In your n8n HTTP Request node:
Step 2 — If n8n is already sending correctly, raise the server URI/header limitsIf the parameters are already in the POST body and you are still getting 414, the issue is in Cloudron's Nginx configuration. The relevant Nginx directive is Since Cloudron manages Nginx configuration, you have two paths: Option A — Cloudron-level configuration Cloudron exposes some Nginx configuration overrides. Check your Cloudron admin panel under the YOURLS app settings for any HTTP limits configuration, or look for a custom Nginx config file in the Cloudron app's data directory (typically at Option B — Add an Nginx override via Cloudron's custom config support If Cloudron supports custom Nginx snippets for the app, add: large_client_header_buffers 4 32k;
client_max_body_size 10m;Option C — Raise Apache limits if the stack uses Apache instead of Nginx If YOURLS is running under Apache rather than Nginx (possible depending on Cloudron's package): LimitRequestLine 65536
LimitRequestFieldSize 65536Add these to the Step 3 — Verify YOURLS's own database column is not the bottleneckSince you confirmed DBeaver can save the URL and it redirects fine, YOURLS's database side is not the issue — the Quick diagnostic — test with curl directlyBypass n8n and test with curl to confirm whether the issue is n8n's request construction or the server configuration: curl -X POST "https://go.rosano.ca/yourls-api.php" \
--data-urlencode "signature=YOUR_TOKEN" \
--data-urlencode "action=shorturl" \
--data-urlencode "url=YOUR_7000_CHARACTER_URL" \
--data-urlencode "format=json"
Summary
Start with the curl test — it will immediately tell you whether this is an n8n configuration issue or a server limit issue, and the fix path is clear from there. Hope this helps — if it answers your question, would you mind clicking "Mark as answer" so others searching for the same thing can find it quickly? |
Beta Was this translation helpful? Give feedback.
-
|
@logusivam did you even read the warning we've sent to you ? |
Beta Was this translation helpful? Give feedback.

Thanks for looking into it. I've asked on the Cloudron forum and will post my solution here if I find one.