Skip to content
SupportDashboard

Limitations

Serverless function limits — JavaScript and TypeScript only, no native dependencies, plus execution timeouts and payload caps by tier.

functions limits timeout payload response size execution time limitations JavaScript TypeScript

Each function is bundled and minified into a single JavaScript file during deployment. Native binaries and non-JavaScript code are stripped out in this process, so libraries that rely on native addons will not work. Common examples include:

  • sharp (image processing) — uses native C++ bindings
  • bcrypt — uses native C bindings (use bcryptjs instead)
  • better-sqlite3 — embeds a native SQLite binary
  • canvas — depends on native Cairo bindings

If you need native dependencies or a non-JavaScript runtime, use Nhost Run instead.

Function execution timeout limits vary by project tier:

Tier Timeout
Starter 10 seconds
Pro 180 seconds (3 min)
Teams 600 seconds (10 min)
Enterprise Custom

If a function exceeds its timeout, the execution is terminated and the client receives an error response.

Parsed request bodies (JSON and URL-encoded form data) are limited to 6 MB. Larger payloads are rejected. For raw access to the unparsed body, read req.rawBody.

All functions have a hard limit of 6 MB for response payloads, regardless of the project tier.