Serverless Function Timeout, Memory & Concurrency Limits

Key Takeaways

Serverless runtime limits define the safe operating envelope for each function. Timeout, memory, temporary storage, and concurrency can each force a different architecture response. Raff Functions runs up to 1 hour by default and up to 24 hours on request, and memory and scaling are editable settings. When normal production work pushes several limits at once, changing compute models is often safer than maximizing every setting.

Serdar Tekin
Serdar Tekin
Co-Founder & CTO
Updated 15 min read
Written for: Developers and platform teams planning serverless timeout, memory, storage, and concurrency limits
Serverless FunctionsRuntime LimitsTimeoutsMemoryConcurrencyTemporary Storage
Last reviewed:
Guide
Serverless Function Timeout, Memory & Concurrency Limits
rafftechnologies.com/learn

Run short tasks as Raff Functions and pay only while they run.

Deploy code without a server, billed per second of use, with a free allowance every month.

A serverless function timeout is the maximum execution window a platform allows before it stops an invocation. It is one of several runtime limits that shape whether a workload fits functions at all.

For Raff Technologies Functions, treat runtime limits as workload-fit constraints: timeouts run up to 1 hour by default and up to 24 hours on request.

Memory, execution duration, temporary storage, concurrency, payload size, and scaling controls are not minor configuration details. They are architectural boundaries. A function can be perfectly written and still fail in production if its workload needs more time, more memory, more local scratch space, or more simultaneous executions than the platform permits.

For small teams, the useful question is not “Which provider has the biggest number?” It is which limit will your workload hit first, and what should you do when it does? Sometimes the answer is to raise a setting. Sometimes it is to split work, move files to object storage, cap concurrency, or choose a VM or container instead.

At Raff, we treat runtime limits as a workload-fit check before deployment. That prevents teams from discovering an architectural mismatch only after traffic, file sizes, or processing times grow.

Runtime limits define the safe operating envelope

Every serverless platform places boundaries around an invocation. The exact numbers vary by provider and can change by plan, runtime, account state, or product generation.

The main limits to review are:

LimitWhat it controlsTypical failure when exceeded
Execution timeoutHow long one invocation may runFunction is terminated before completion
MemoryHow much RAM an instance can useOut-of-memory failure, crash, or severe slowdown
Temporary storageHow much local scratch space is availableFile processing or extraction fails mid-run
ConcurrencyHow many executions can run at onceThrottling, queueing, rejected work, or downstream overload
Scaling rangeHow many instances the platform may addTraffic cannot expand beyond configured capacity
Request/response limitsHow much data can cross the invocation boundaryLarge requests or responses are rejected

These limits interact. Giving a job more memory may shorten its runtime. Increasing concurrency may solve a traffic bottleneck but overwhelm a database. A longer timeout may let a job finish but also keep failed work running longer before the system gives up.

A runtime limit is not just a platform restriction; it is a signal about where state, files, and long work should live.

The right design starts by identifying the dimension most likely to become the bottleneck.

Function timeout should match bounded work

Timeout is the clearest serverless limit because it creates a hard execution boundary.

If a function has a five-minute timeout and the task needs six minutes, the architecture does not become “almost correct.” The invocation can be stopped before its work finishes. That can leave partial database writes, incomplete files, or an external operation whose final state is uncertain.

A timeout should therefore be longer than the normal execution time but not treated as an unlimited safety net.

Use three numbers when planning:

  • normal duration: what the job usually needs;
  • high-percentile duration: what slower but healthy executions need;
  • hard timeout: the point at which continuing is no longer useful or safe.

For a synchronous user request, the practical limit may be much shorter than the platform maximum. A browser, reverse proxy, API client, payment service, or upstream gateway can give up before the function platform does.

For background work, a longer function timeout can be useful when the task is bounded and independently observable. Raff Functions runs up to 1 hour by default and up to 24 hours on request. That is a product limit, not a recommendation to run every task for hours.

The dedicated Long-Running Serverless Functions guide owns the design of AI, ETL, batch, and durable long-running jobs. The distinction here is simpler: timeout is the execution ceiling; job architecture determines whether it is safe to approach that ceiling.

When work routinely approaches the timeout, do not immediately increase it. First ask whether the workload should be split, checkpointed, handed to an asynchronous path, or moved to always-on compute.

Memory limits affect both capacity and execution behavior

A function's memory setting determines how much working memory the execution environment can use. Memory pressure is common in workloads that parse files, build large in-memory objects, transform images, decompress archives, process data frames, or load substantial dependencies.

The failure mode is not always a clean “out of memory” message. Memory pressure can increase garbage collection, cause runtime instability, or make an otherwise short function much slower.

A useful memory review separates four categories:

  1. runtime baseline — language runtime and framework overhead;
  2. application baseline — imported libraries, clients, caches, and initialized objects;
  3. per-request working set — data needed for one invocation;
  4. temporary peak — decompression, conversion, serialization, or parallel work that briefly needs more RAM.

Measure peak behavior with realistic inputs rather than the smallest development example.

On Raff Functions, memory is an editable setting per function, with 256 MB as the default. Set it from measured peak memory and raise it in the dashboard or API when the function needs more.

More memory can sometimes reduce execution time, but that does not automatically make it the cheapest or best configuration. The Serverless Function Pricing guide owns the detailed cost trade-off.

Temporary storage is scratch space, not durable state

Temporary local storage is useful for intermediate work:

  • unpacking an archive;
  • resizing an image;
  • generating a PDF before upload;
  • buffering a conversion;
  • staging a download;
  • creating an intermediate export file.

It should not be treated as the permanent home for application data.

Serverless execution environments can be replaced, scaled down, or recreated. Even when local data happens to survive between warm invocations, that reuse is an optimization opportunity, not a durability guarantee.

A safer pattern is:

Text
Durable input ↓ Function downloads only what it needs ↓ Temporary local processing ↓ Function uploads durable output ↓ Temporary files can disappear safely

For Raff workloads, durable files should normally live in Object Storage, while durable records and job state belong in a database. That keeps correctness independent of whether the next invocation lands on the same execution environment.

Raff Functions binds to Raff Object Storage, so large or durable files belong in a bucket rather than in the function's temporary space.

If a workload needs a large persistent filesystem, repeated access to the same local data, or extensive disk-heavy processing, that is a strong signal to compare the function with a VM or container-based runtime rather than trying to stretch ephemeral storage into a filesystem service.

Concurrency limits protect both the platform and dependencies

Concurrency is the number of executions that are in flight at the same time. It is not the same as requests per second.

A fast 20 ms handler can process many requests with relatively little concurrency. A 10-second handler can create substantial concurrency at a much lower request rate because each invocation remains active longer.

The basic relationship is:

Text
longer execution time + more incoming work ↓ more simultaneous invocations

Concurrency has two different failure directions.

Too little available concurrency can cause throttling, delayed work, or a backlog during bursts.

Too much uncontrolled concurrency can overwhelm systems behind the function. A function tier may scale successfully while the database hits its connection limit, a third-party API rate-limits requests, or a legacy service becomes saturated.

That is why the right concurrency setting is not simply “as high as possible.” It should fit the narrowest downstream dependency.

The previous Cold Starts, Concurrency, and Scale-to-Zero guide owns the relationship between burst concurrency, new instances, cold starts, and latency. This guide owns concurrency as a hard capacity and safety boundary.

Raff Functions autoscales with load, with a default scaling setting of 0 → 10 instances that you can edit. Brand-new accounts run with lower concurrency and scale limits until $10 lifetime paid, after which those limits lift automatically.

Hitting a limit should trigger a specific architecture response

A runtime limit is most useful when the team knows what action follows.

Use this decision framework:

SymptomLikely limitFirst responseEscalation path
Invocation stops before work completesTimeoutFind where time is spent; remove avoidable blockingSplit/chunk work or use a longer-running model
Process crashes on larger inputsMemoryMeasure peak working set; stream/chunk dataIncrease memory or move memory-heavy work
Local file workflow fails on large artifactsTemporary storageStream data and upload outputs earlyUse object storage or filesystem-based compute
Bursts are throttledConcurrency/scalingMeasure in-flight work and configured scaleRaise safe capacity if dependencies can support it
Database/API becomes unstable during scale-outDownstream capacityCap concurrency and reuse connections carefullyAdd queueing, pooling, or redesign dependency path
Client gives up before function finishesEnd-to-end timeoutMeasure client/gateway timeout separatelyMake work asynchronous

The important distinction is between a configuration problem and a workload-shape problem.

If the workload is comfortably inside the platform envelope and a setting is simply too conservative, adjust the setting. If normal production behavior repeatedly presses against several limits at once, changing numbers can postpone rather than solve the mismatch.

When a function needs maximum duration, maximum memory, large persistent disk, and constant concurrency at the same time, the problem is usually the compute model—not four independent settings.

That is the point where Serverless Functions vs VMs becomes the more useful decision guide.

Raff gives long-running workloads more timeout headroom

Raff Functions differs from many short-duration FaaS products in one area that directly matters to runtime-limit planning: the published execution window is much longer.

The current product page states:

  • timeout settings are editable after creation;
  • Functions run up to 1 hour by default;
  • workloads can run up to 24 hours on request;
  • memory and scaling are editable settings;
  • the current deployment example shows 256 MB, 5 minutes, and 0 → 10 scaling;
  • autoscaling follows load and idle functions can scale to zero;
  • new accounts have lower concurrency and scale limits until $10 lifetime paid.

The 256 MB memory, 5-minute timeout and 0→10 scaling values are defaults you can edit, not maximums; the timeout ceiling is 1 hour by default and 24 hours on request.

We deliberately do not publish a guessed maximum for memory or temporary storage in this guide because the current public Functions page does not state one. For those dimensions, the live dashboard/API is the correct source before a production deployment.

From an architecture perspective, Raff's longer timeout means more bounded background work can remain in the Functions model instead of being moved solely because of a short execution ceiling. It does not remove the need for durable state, object storage, safe concurrency, or a VM when the workload genuinely needs a persistent server environment.

Compare Raff Functions with always-on compute before choosing a runtime envelope for production.

Production teams should test the limit that will fail first

A good pre-production test does not ask only whether the happy-path request succeeds.

Test the edge of each relevant dimension:

  • largest realistic input;
  • slowest healthy external dependency;
  • peak memory during parsing or conversion;
  • longest expected healthy execution;
  • burst concurrency rather than one request at a time;
  • database connection pressure under scale-out;
  • behavior when the timeout is actually reached;
  • cleanup after an interrupted invocation;
  • durability of outputs if the execution environment disappears.

Then define a guardrail for each limit.

For example:

Text
Expected duration: 40–90s Configured timeout: enough headroom for healthy variance Large input handling: streamed, not fully buffered Durable files: Object Storage Durable state: database Concurrency cap: below downstream saturation point Failure behavior: retryable or safely resumable

This is more useful than testing one synthetic request and assuming production will behave the same way.

The best serverless design is not the one furthest from every limit. It is the one where the team knows which limits matter, has headroom for normal variance, and has a clear alternative when the workload grows beyond the envelope.

Once runtime limits are measured, use Operating Serverless Functions in Production to define monitoring, failure response, version rollback and recovery.

Runtime limits should make the compute decision clearer

Serverless function limits are useful architectural boundaries. Timeout tells you how long one execution may live. Memory defines the working set available to the runtime. Temporary storage should remain scratch space. Concurrency determines how much simultaneous work the platform and its dependencies can safely absorb.

Do not optimize every limit independently. Identify which constraint the workload is most likely to hit first, then decide whether the right response is configuration, streaming, object storage, asynchronous work, controlled concurrency, or a different compute model.

Raff's current 1-hour default timeout and 24-hour-on-request option give bounded long-running work more room than short-duration FaaS models. But the same design rule still applies: a function should fit its runtime envelope cleanly rather than depend on every limit being pushed to its maximum.

Sources

Was this article helpful?
Serdar Tekin
Serdar Tekin
Co-Founder & CTO

Co-Founder & CTO at Raff, focused on cloud infrastructure, systems architecture, security, reliability, and production operations.

Run short tasks as Raff Functions and pay only while they run.

Deploy code without a server, billed per second of use, with a free allowance every month.

14-day money-back guarantee

Frequently asked questions

What is a serverless function timeout?
A serverless function timeout is the maximum execution window allowed for one invocation before the platform stops it. Production timeout planning should also account for client, gateway, and upstream timeouts that may be shorter.
How long can a Raff Function run?
Up to 1 hour by default and up to 24 hours on request, where AWS Lambda stops at 15 minutes.
What happens when a serverless function exceeds its memory limit?
The function can fail, crash, or become unstable under memory pressure. Measure the runtime baseline, application baseline, per-request working set, and temporary peak using realistic production inputs.
Should serverless functions store files in temporary local storage?
Temporary local storage is appropriate for scratch work, but durable files should be written to persistent storage such as object storage because execution environments can be replaced or removed.
What is a serverless concurrency limit?
A concurrency limit controls how many function executions can be in flight at once. Too little capacity can throttle work, while excessive concurrency can overwhelm databases, APIs, or other downstream dependencies.
Is Raff's 0 to 10 scaling value a maximum?
No. 0→10 is the default scaling setting for a new function, and you can edit it; brand-new accounts have lower limits until $10 lifetime paid.
When should a workload move from serverless functions to a VM?
Consider a VM or container when normal work repeatedly needs very long execution, high memory, persistent local storage, constant capacity, or several maximumed serverless limits at the same time.