Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

serverless dev silently skips functions beyond the 25th: "Maximum queued offline subscription reached"

Đang mở
#13,920 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@czubocha đang làm issue này rồi.

Từ ngày 1/10/2026.

  • #13940 của @CodeXAniket — đã merge

Đá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
Lĩnh vực
cli, cloud

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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của serverless/serverless

Tất cả issue của serverless/serverless

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.