kit icon indicating copy to clipboard operation
kit copied to clipboard

Form Posts with lots of keys cause issues in when deployed to Vercel

Open luthfib opened this issue 2 years ago • 0 comments

Describe the bug

When trying to post larger form actions posts in vercel functions I get the following in Vercel:

Task timed out after 15.01 seconds

in my form action it crashes in the following line:

let formData = await request.formData();

The actual content length of the request in bytes is 21635

Reproduction

Below is the an example formData test payload that it happens in. This only happens when deployed to Vercel and not locally:

415_name: Test_1
415_other_name:  Test_1
415_id_number: 23432423
415_birth: 12
415_birth: July
415_birth: 1982
415_country: Colombia
415_gender: Male
415_alternative_name: Test_1
415_country-of-residence: Colombia
415_question: Colombia
415_number: +65
415_number: +23423423342
415_role: Regular
415_question_2: Yes
415_radio_question: No
415_musician: No
415_meal: Yes
415_other_meal: No
415_vegeterian_meal: No
415_language-translation-needed: No
415_family-programme: No
415_social-projects: No
416_name:  Test_2
416_other_name: Test_2
416_id_number: 24234234
416_birth: 2
416_birth: April
416_birth: 1999
416_country: Colombia
416_gender: Female
416_alternative_name: Test_2
416_country-of-residence: Colombia
416_question: Colombia
416_number: +1
416_number: +42342342
416_role: Regular
416_question_2: No
416_radio_question: No
416_musician: No
416_meal: Yes
416_other_meal: No
416_vegeterian_meal: No
416_language-translation-needed: No
416_family-programme: No
416_social-projects: No
417_name: Test_3
417_other_name: Test_3
417_id_number: 23423423
417_birth: 4
417_birth: July
417_birth: 1972
417_country: Colombia
417_gender: Male
417_alternative_name: Test_3
417_country-of-residence: Colombia
417_question: Colombia
417_number: +1
417_number: +234234234
417_role: Normal
417_question_2: Yes
417_radio_question: No
417_musician: No
417_meal: Yes
417_other_meal: No
417_vegeterian_meal: No
417_language-translation-needed: No
417_family-programme: No
417_social-projects: No
418_name: Test_4
418_other_name: Test_4
418_id_number: 2423423
418_birth: 9
418_birth: August
418_birth: 1959
418_country: Colombia
418_gender: Female
418_alternative_name: Test_4
418_country-of-residence: Colombia
418_question: Colombia
418_number: +1
418_number: +4534543
418_role: Normal
418_question_2: Yes
418_radio_question: No
418_musician: No
418_meal: Yes
418_other_meal: No
418_vegeterian_meal: No
418_language-translation-needed: No
418_family-programme: No
418_social-projects: No
419_name: Test_5
419_other_name: Test_5
419_id_number: 234234
419_birth: 15
419_birth: January
419_birth: 1999
419_country: Colombia
419_gender: Male
419_alternative_name: Test_5
419_country-of-residence: Colombia
419_question: Colombia
419_number: +1
419_number: +423423432
419_role: Regular
419_question_2: No
419_radio_question: No
419_musician: No
419_meal: Yes
419_other_meal: No
419_vegeterian_meal: No
419_language-translation-needed: No
419_family-programme: No
419_social-projects: No
420_name: Test_6
420_other_name: Test_6
420_id_number: 23423423
420_birth: 13
420_birth: June
420_birth: 2001
420_country: Colombia
420_gender: Female
420_alternative_name: Test_6
420_country-of-residence: Colombia
420_question: Colombia
420_number: +1
420_number: +435345242
420_role: General participant
420_question_2: Yes
420_radio_question: No
420_musician: No
420_meal: Yes
420_other_meal: No
420_vegeterian_meal: No
420_language-translation-needed: No
420_family-programme: No
420_social-projects: No
421_name: Test_7
421_other_name: Test_7
421_id_number: 5235423
421_birth: 26
421_birth: June
421_birth: 2002
421_country: Colombia
421_gender: Female
421_alternative_name: Test_7
421_country-of-residence: Colombia
421_question: Colombia
421_number: +1
421_number: +453453453
421_role: General participant
421_question_2: Yes
421_radio_question: No
421_musician: No
421_meal: Yes
421_other_meal: No
421_vegeterian_meal: No
421_language-translation-needed: No
421_family-programme: No
421_social-projects: No
422_name: Test_8
422_other_name: Test_8
422_id_number: 23423423
422_birth: 6
422_birth: December
422_birth: 1970
422_country: Colombia
422_gender: Male
422_alternative_name: Test_8
422_country-of-residence: Colombia
422_question: Colombia
422_number: +1
422_number: +234234234
422_role: Regular
422_question_2: Yes
422_radio_question: No
422_musician: No
422_meal: Yes
422_other_meal: No
422_vegeterian_meal: No
422_language-translation-needed: No
422_family-programme: No
422_social-projects: No
415_emergency-name: Emergency_test
415_emergency-relationship: Father
415_emergency-email-address: [email protected]
415_emergency-phone-number: +1
415_emergency-phone-number: 223423432

Logs

No response

System Info

System:
    OS: macOS 14.1.2
    CPU: (8) arm64 Apple M2
    Memory: 81.77 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.1.0 - ~/.nvm/versions/node/v21.1.0/bin/node
    npm: 10.2.0 - ~/.nvm/versions/node/v21.1.0/bin/npm
    pnpm: 8.11.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Brave Browser: 120.1.61.109
    Chrome: 121.0.6167.139
    Safari: 17.1.2
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.1.0
    @sveltejs/adapter-vercel: ^5.1.0 => 5.1.0
    @sveltejs/eslint-config: ^6.0.4 => 6.0.4
    @sveltejs/kit: ^2.5.0 => 2.5.0
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.1
    svelte: ^4.2.1 => 4.2.1
    vite: ^5.0.0 => 5.0.11

Severity

serious, but I can work around it

Additional Information

Although not blocking usage, it is blocking a fair number of customers.

luthfib avatar Feb 03 '24 21:02 luthfib