serverless dev silently skips functions beyond the 25th: "Maximum queued offline subscription reached"
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, javascript, node.js
Hướng nghiên cứu
Start with the subscription loop shown in dist/sf-core.js and reproduce it using the 26-function serverless.yml example with serverless dev --stage dev --debug. Check that the function beyond the 25th is subscribed and its request reaches handler.js, while the Maximum queued offline subscription reached error no longer occurs.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue description
serverless dev silently skips every function after the 25th in a service. It never subscribes to their IoT topics, so their invocations never reach the local session, timing out. Functions 1–25 work normally.
The error i could see with --debug, is:
s:sls:dev: IoT connection error Error: Maximum queued offline subscription reached
Possible Cause (from dist/sf-core.js)
The dev session subscribes to ${functionName}/request and ${functionName}/error for every function before the IoT connection is established:
for (let functionName of functionNames)
device.subscribe(this.getTopicId(`${functionName}/request`), { qos: 1 }),
device.subscribe(this.getTopicId(`${functionName}/error`), { qos: 1 });
While offline, the aws-iot-device-sdk queues subscriptions in offlineSubscriptionQueue, capped at offlineSubscriptionQueueMaxSize = 50. Past that it emits "Maximum queued offline subscription reached" and drops the subscription. At 2 topics per function, only the first 25 functions get subscribed.
Expected
All functions are invokable through serverless dev.
Workaround
Move the function you need within the first 25 entries of functions:.
Context
Serverless Framework version: 4.43.0 (AWS provider, runtime nodejs24.x)
serverless.yml: the real service has 32 functions; any service with 26+ functions reproduces it. Minimal repro:
service: dev-subscription-repro
provider:
name: aws
runtime: nodejs24.x
functions:
fn01: { handler: handler.hello }
fn02: { handler: handler.hello }
# ... fn03 to fn25, same shape ...
fn25: { handler: handler.hello }
fn26:
handler: handler.hello
events:
- httpApi:
path: /fn26
method: GET
// handler.js
exports.hello = async () => ({ statusCode: 200, body: "ok" });
This request never reaches the handler.
Command:
serverless dev --stage dev --debug
Error output ():
s:sls:dev: IoT connection error Error: Maximum queued offline subscription reached
No stack trace is printed;
- Ngôn ngữ chính
- JavaScript
- Star
- 46.9k
- Fork
- 5.7k
- Merge trung bình
- 17 giờ 46 phút
- Pull request đã merge (30 ngày)
- 73
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của serverless/serverless
-
excludeNodeDevDependencies includes all dev dependencies if serviceDir has symlinksCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug cat/packaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
serverless/serverless#13447 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
serverless/serverless#13987 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Custom API gateway domain is always ipv4Có thể đã có người làm @czubocha đã nhận 1 ngày trước. Đang mở
serverless/serverless#13985 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Execute the release: Binary Installer workflowCó thể đã có người làm @czubocha đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 Nửa ngày Mức phù hợp với người mới 12/100
serverless/serverless#13984 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sandbox packages (zips) are not cleared from deployment bucket as stack dirs areCó thể đã có người làm @czubocha đã nhận 20 ngày trước. Đang mởbug cat/packaging
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
serverless/serverless#13906 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của serverless/serverless
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
maproulette/maproulette-frontend#2944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
NanmiCoder/dsh-agent-teams#255 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jaegertracing/jaeger-ui#4618 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:plugins enhancement platform:vscode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
anthropics/claude-code#103166 ·
Maintainer thường phản hồi trong vòng 1 ngày