jazzband / django-formtools

A set of high-level abstractions for Django forms
https://django-formtools.readthedocs.io
BSD 3-Clause "New" or "Revised" License
784 stars 135 forks source link

Large POST request issue #274

Open rlalik opened 2 months ago

rlalik commented 2 months ago

Hi, I have weird issue and I don't know how to even describe it.

I have some form which imports data from json file and insert into database.

I have a master file which is the larges, and two smaller versions for tests:

-rw-r--r-- 1 rafal rafal 7.8M 05-17 17:32 pickle_dump.json
-rw-r--r-- 1 rafal rafal 803K 05-17 17:37 pickle_dump_small.json
-rw-r--r-- 1 rafal rafal 549K 05-28 14:37 pickle_dump_smaller.json

It all works nicely with _smaller and _small files, but when it comes to the regular one, my wizard comes to the last step, and when making final submission, the done() function is not entered at all, and the wizard goes back to the final step again. The request doesn't show anything suspicious (requests for the fours steps):

[28/May/2024 13:35:49] "POST /manager/import/calibration_file/wizard HTTP/1.1" 200 1006741 - step 2
[28/May/2024 13:35:58] "POST /manager/import/calibration_file/wizard HTTP/1.1" 200 4953 - step 3
[28/May/2024 13:36:16] "POST /manager/import/calibration_file/wizard HTTP/1.1" 200 16810013 - step 4
[28/May/2024 13:36:33] "POST /manager/import/calibration_file/wizard HTTP/1.1" 200 13346589 - step 4 - this is after the wizard reentered the last step

For me it looks like some issue with the size of POST request, so not sure whether this is django, the server (I use test server provided by django) or the formtools issue.

Just in case I increased the upload memory size:

DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 * 8  # 2.5 MB * 8

Any ideas what can be wrong?

deviserops commented 2 months ago

@rlalik As I understand and If I relate to a apache server you have to set 2-3 data for POST form, the value you provided is memory size not the form data size, check if there config too.

Note : As your description say's that you are using test server provided by django so there must be some limitation. 🤞