Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Functions body limit #3953

Open
T0uch-Me opened this issue Apr 6, 2025 · 0 comments
Open

Server Functions body limit #3953

T0uch-Me opened this issue Apr 6, 2025 · 0 comments
Labels
start Everything about TanStack Start

Comments

@T0uch-Me
Copy link

T0uch-Me commented Apr 6, 2025

Which project does this relate to?

Start

Describe the bug

the current implementation server function buffer everything in memory since there no body limit like next.js server action this allow any user to upload large payloads to any server function POST endpoint. if dev not handled this properly this can cause OOM if self-hosted

Your Example Website or App

https://tanstack.com/_server/app_utils_config_ts--getTanstackDocsConfig_createServerFn_handler?payload=%7B%22data%22%3A%7B%22repo%22%3A%22tanstack%2Frouter%22%2C%22branch%22%3A%22main%22%2C%22docsRoot%22%3A%22docs%2Fstart%22%7D%2C%22context%22%3A%7B%7D%7D&createServerFn

Steps to Reproduce the Bug or Issue

send large payloads (binary, form data, etc.) to any server function endpoint

Expected behavior

abilty to set body limit globally and per server function

Screenshots or Videos

Image

test upload 100MB file to tanstack.com server function endpoint

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

@SeanCassiere SeanCassiere added the start Everything about TanStack Start label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
start Everything about TanStack Start
Projects
None yet
Development

No branches or pull requests

2 participants