Functions

Function quotas and metering

Functions use the same subscription and plan catalog as the rest of CubiBase. Limits are enforced by the engine on every trigger type — never only in the Console.

What is limited

DimensionScopeAt the limit
Functions per projectProjectCreating another function is refused (402)
InvocationsOrganization (shared), per billing cycleInvocations rejected (402); async events retry, then dead-letter
Compute (GB-seconds)Organization (shared), per billing cycleSame as invocations
Memory per functionPlan ceilingConfiguration above the ceiling is refused
Concurrent executionsProjectHTTP callers get 429; async events wait and retry
Deployment artifact sizePer deploymentThe build fails; the active version keeps serving
Enabled schedulesProjectCreating another schedule is refused
Execution log retentionPlanOlder records are purged

Monthly allowances are organization-level, shared across all projects, and follow the existing billing cycle: the Stripe period for paid plans, the calendar month (UTC) for Free — the same convention as storage bandwidth. Buying additional projects does not increase them. Counters are reserved atomically, so concurrent invocations cannot race past a limit.

What is counted

  • Every executed invocation counts — success, failure and timeout alike. Requests rejected by the gateway (auth, signature, quota, concurrency) never reach the runtime and are not billed as invocations.
  • Compute is GB-seconds: configured memory (GB) × billed duration. Billed duration is the handler time rounded up to 100 ms increments, floored at 100 ms and capped at the configured timeout.
  • All four trigger types and Console test invocations meter identically.
Allowance exhausted
HTTP/1.1 402 Payment Required

{
  "error": {
    "code": "FUNCTIONS_QUOTA_EXCEEDED",
    "message": "Monthly invocation allowance exhausted…",
    "details": { "quota": "functions_invocations_monthly", "limit": 100000, "used": 100000 }
  }
}

Current plan values

FreeProBusiness
Functions per project525100
Invocations per month (shared)500,0002,000,0006,000,000
Compute per month (shared)10,000 GB-s50,000 GB-s300,000 GB-s
Execution timeout5 sec30 sec60 sec
Max memory per function128 MB256 MB512 MB
Concurrent executions per project52050
Enabled schedules per project21050
Execution log retention3 days14 days30 days

By default there are no automatic overage charges: a quota is a hard stop, not a bill. On Pro and Business you can opt in to additional usage (Console → Billing → Additional Usage): excess invocations and compute then bill at the published rates under a monthly spending limit you set — it is never enabled for you. Upgrading raises the limits immediately; the next cycle resets monthly counters. See the pricing page for the full plan comparison and rates, and the Console at Functions → Usage & Quotas for your live usage, warnings and exceeded state. Example host: example-project.api.cubibase.com.

Additional resources