Repository: kiwitcms/Kiwi (language: python)

Issue:
Unable to assign to the test run, we encounter a 404 "Page not found" error
**Hi Team,**  

We are facing some issues with assigning test runs to the default tester. For example, when we choose over 175 test cases to assign to the test run, we encounter a 404 "**_Page not found_**" error. However, everything functions as expected when the number of test cases is below 175.

**### Steps to Reproduce**

1. Create a test plan that encompasses more than 175 test cases. Once completed, check the box to select all the test cases simultaneously.
2. Next, click the three-bar icon to allocate the test run.
3. The page is currently showing a "404 page not found" error. Nevertheless, the test cases numbered below 175 are working correctly.

**### Actual results**
![Test_run_issue](https://github.com/user-attachments/assets/0addd707-4517-4132-9443-fae9fc420e60)


**### Additional info:-** 
```
https://wasabi.tenant.kiwitcms.org/runs/from-plan/1833/?c=24972&c=24973&c=24974&c=24975&c=24976&c=24977&c=24978&c=24979&c=24980&c=24981&c=24982&c=24983&c=24984&c=24985&c=24986&c=24987&c=24988&c=24989&c=24990&c=24991&c=24992&c=24993&c=24994&c=24995&c=24996&c=24997&c=24998&c=24999&c=25000&c=25001&c=25002&c=25003&c=25004&c=25005&c=25006&c=25007&c=25008&c=25009&c=25010&c=25011&c=25012&c=25013&c=25014&c=25015&c=25016&c=25017&c=25018&c=25019&c=25020&c=25021&c=25022&c=25023&c=25024&c=25025&c=25026&c=25027&c=25028&c=25029&c=25030&c=25031&c=25032&c=25033&c=25034&c=25035&c=25036&c=25037&c=25038&c=25039&c=25040&c=25041&c=25042&c=25043&c=25044&c=25045&c=25046&c=25047&c=25048&c=25049&c=25050&c=25051&c=25052&c=25053&c=25054&c=25055&c=25056&c=25057&c=25058&c=25059&c=25060&c=25061&c=25062&c=25063&c=25064&c=25065&c=25066&c=25067&c=25068&c=25069&c=25070&c=25071&c=25072&c=25073&c=25074&c=25075&c=25076&c=25077&c=25078&c=25079&c=25080&c=25081&c=25082&c=25083&c=25084&c=25085&c=25086&c=25087&c=25088&c=25089&c=25090&c=25091&c=25092&c=25093&c=25094&c=25095&c=25096&c=25097&c=25098&c=25099&c=25100&c=25101&c=25102&c=25103&c=25104&c=25105&c=25106&c=25107&c=25108&c=25109&c=25110&c=25111&c=25112&c=25113&c=25114&c=25115&c=25116&c=25117&c=25118&c=25119&c=25120&c=25121&c=25122&c=25123&c=25124&c=25125&c=25126&c=25127&c=25128&c=25129&c=25130&c=25131&c=25132&c=25133&c=25134&c=25135&c=25136&c=25137&c=25138&c=25139&c=25140&c=25141&c=25142&c=25143&c=25144&c=25145&c=25146&c=25147&c=25148&c=25149

Request Method: GET
Status Code: 404 Not Found
Remote Address: 100.24.231.234:443
```


Discussion / hints:

Fix patch:
diff --git a/etc/uwsgi.conf b/etc/uwsgi.conf
index fb611c6a56..92a966b297 100644
--- a/etc/uwsgi.conf
+++ b/etc/uwsgi.conf
@@ -7,7 +7,8 @@ socket = /tmp/kiwitcms.sock
 ; one worker process for each CPU core
 processes = %k
 harakiri = 30
-max-requests = 1000
+max-requests = 1024
+buffer-size = 20480
 vacuum = true
 home = /venv
 
diff --git a/tcms/settings/common.py b/tcms/settings/common.py
index ced2724cd0..8135ddc756 100644
--- a/tcms/settings/common.py
+++ b/tcms/settings/common.py
@@ -150,6 +150,9 @@
 # x1.5 to be able to upload base64 encoded attachments via RPC
 DATA_UPLOAD_MAX_MEMORY_SIZE = int(FILE_UPLOAD_MAX_SIZE * 1.5)
 
+# maximum number of parameters that may be received via GET or POST
+DATA_UPLOAD_MAX_NUMBER_FIELDS = 1024
+
 # Controls if django-attachments deletes files from disk
 DELETE_ATTACHMENTS_FROM_DISK = True
 


Test patch:
diff --git a/tests/nginx-proxy/nginx.conf b/tests/nginx-proxy/nginx.conf
index 06a0c4e2f7..fba2ba4ba8 100644
--- a/tests/nginx-proxy/nginx.conf
+++ b/tests/nginx-proxy/nginx.conf
@@ -16,6 +16,10 @@ http {
     # FILE_UPLOAD_MAX_SIZE from Kiwi TCMS which defaults to 5M.
     client_max_body_size 6m;
 
+    # limit URI size, see https://github.com/kiwitcms/Kiwi/issues/1054
+    # Kiwi TCMS defaults to 10k
+    large_client_header_buffers 6 12k;
+
     ssl_certificate     /etc/nginx/localhost.crt;
     ssl_certificate_key /etc/nginx/localhost.key;