tencent cloud

Serverless Cloud Function

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Related Concepts
How It Works
Strengths
Scenarios
Related Products
Purchase Guide
Billing Overview
Billing Mode
Billable Items and Billing Modes
Function Computing Power Support
Free Tier
SCF Pricing
Billing Example
Payment Overdue
Getting Started
Creating Event Function in Console
User Guide
Quota Management
Managing Functions
Web Function Management
Log Management
Concurrence Management
Trigger Management
Function URL
A Custom Domain Name
Version Management
Alias Management
Permission Management
Running Instance Management
Plugin Management
Managing Monitors and Alarms
Network Configuration
Layer Management
Execution Configuration
Extended Storage Management
DNS Caching Configuration
Resource Managed Mode Management
Near-Offline Resource Hosting Model
Workflow
Triggers
Trigger Overview
Trigger Event Message Structure Summary
API Gateway Trigger
COS Trigger
CLS Trigger
Timer Trigger
CKafka Trigger
Apache Kafka Trigger
MQTT Trigger
Trigger Configuration Description
MPS Trigger
CLB Trigger Description
TencentCloud API Trigger
Development Guide
Basic Concepts
Testing a Function
Environment Variables
Dependency Installation
Using Container Image
Error Types and Retry Policies
Dead Letter Queue
Connecting SCF to Database
Automated Deployment
Cloud Function Status Code
Common Errors and Solutions
Developer Tools
Serverless Web IDE
Calling SDK Across Functions
Third-Party Tools
Code Development
Python
Node.js
Golang
PHP
Java
Custom Runtime
Deploying Image as Function
Web Framework Development
Deploying Framework on Command Line
Quickly Deploying Egg Framework
Quickly Deploying Express Framework
Quickly Deploying Flask Framework
Quickly Deploying Koa Framework
Quickly Deploying Laravel Framework
Quickly Deploying Nest.js Framework
Quickly Deploying Next.js Framework
Quickly Deploying Nuxt.js Framework
Quickly Deploying Django Framework
Use Cases
Overview
Solutions with Tencent Cloud Services
Business Development
TRTC Practices
COS Practices
CKafka Practice
CLS
CLB Practice
MPS
CDN
CDWPG
VOD
SMS
ES
Scheduled Task
Video Processing
Success Stories
Tencent Online Education
Online Video Industry
Tencent Online Education
Best Practice of Tencent IEG Going Global
API Documentation
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
SDK Documentation
FAQs
General
Web Function
Billing FAQs
Network FAQs
Log FAQs
SCF utility class
Event Handling FAQs
API Gateway Trigger FAQs
Related Agreement
Service Level Agreement
Contact Us
Glossary

Concurrency Overrun

PDF
Focus Mode
Font Size
Last updated: 2024-12-02 20:07:18

Concurrency Overrun

Concurrency overrun (ResourceLimitReached) refers to a situation where the number of concurrent executions of an SCF function at the same time exceeds the quota limit, leading to a function error. Concurrency overrun is divided into two types: sync invocation and async invocation.

Async invocation

Types of async invocation include async invocation by TencentCloud API trigger, COS trigger, scheduled trigger, CMQ topic trigger, CLS trigger, MPS trigger, etc. For specific trigger invocation types, please see the relevant trigger documentation. When concurrency overrun occurs in an async invocation, the function will automatically retry. For more information, please see Error Types and Retry Policies.

Sync invocation

Types of sync invocation include sync invocation by TencentCloud API trigger, API Gateway trigger, and CKafka trigger. In sync invocation, the error message will be directly returned; therefore, when an error occurs in sync invocation, the platform will not automatically retry, and the retry policy (i.e., whether to retry and the number of retries) will be determined by the invoker. In this case, the function will return a 432 status code and will not retry the request.

Concurrency Overrun Troubleshooting

Viewing concurrency overrun monitoring data

You can view the number of limited times and specific logs of the function in the SCF console.

Viewing the number of limited times

1. Log in to the Serverless console and select Function Service on the left sidebar.
2. On the Function Service page, select the name of the function you want to view to enter its details page.
3. In Function Management, select Monitoring information > Limited times to view the limited times of the function as shown below:



Viewing function limit log

1. Log in to the Serverless console and select Function Service on the left sidebar.
2. On the Function Service page, select the name of the function you want to view to enter its details page.
3. In Log Query, select Invocation Logs > Too many invocations to view specific limit logs of the function as shown below:



Fixing concurrency overrun

For async invocation, there is a system retry policy for concurrency overrun errors, which can automatically process concurrency overrun and retry the requests. Normally, you don't need to perform any operations for concurrency overrun in async invocation; instead, during the maximum waiting time you set, the SCF platform will automatically retry the requests.
When an error occurs in sync invocation, the error message will be directly returned, and the request will not be retried.
Note:
In async invocation, if your business system is more sensitive to timeliness, you can reduce or minimize the impact of overrun errors on your business system by configuring reserved quota. For example, if you want that important messages will not be lost after the set maximum retention time elapses, you should configure a dead letter queue (DLQ).

Configuring DLQ

A DLQ is a CMQ queue under your account used to collect error event information and analyze causes of failures. If you have configured a DLQ for a function, messages in retry failures caused by overrun will be sent to it. For more information, please see Creating Dead Letter Queue.

Configuring reserved quota

The reserved quota is the maximum quota used to guarantee the available concurrency of a function. By configuring the reserved quota, the function can start enough concurrent instances within the quota, and the maximum number of concurrent instances can reach the configured quota. After the reserved quota is set, the function no longer shares the concurrency quota at the account level with other functions, which can reduce the possibility of concurrency overrun and guarantee smooth function execution. For more information, please see Reserved Concurrency.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback