Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publisher stops suddenly. (deadlock?) #645

Open
caoyang1024 opened this issue Oct 5, 2024 · 2 comments
Open

publisher stops suddenly. (deadlock?) #645

caoyang1024 opened this issue Oct 5, 2024 · 2 comments

Comments

@caoyang1024
Copy link

Observed behavior

try to stress test nats, by sending 1000 msg/s each thread, with 1 - 100 different number of threads, when threads go higher, this situation happens more often.

Expected behavior

looks to me like a deadlock, i can provide more info if needed.

Snipaste_2024-10-05_18-19-57

Server and client version

"version": "2.10.21"

Host environment

No response

Steps to reproduce

No response

@mtmk
Copy link
Collaborator

mtmk commented Oct 5, 2024

thanks for the report @caoyang1024 I'm suspecting potentially using semaphore might be causing this and thinking about switching to using a channel instead, but just speculating at the moment. If you could post a minimal console app program.cs and the server setup that would help a lot.

@caoyang1024
Copy link
Author

@mtmk sure. here is my testing code. https://github.com/caoyang1024/stress-test.git

i'm running my NATS using docker locally.

services:
  nats:
    image: nats
    ports:
      - "4222:4222"
      - "8222:8222"
    command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 --http_port 8222 "
    networks: ["nats"]
  nats-1:
    image: nats
    ports:
      - "4223:4222"
    command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 --routes=nats://ruser:T0pS3cr3t@nats:6222"
    networks: ["nats"]
    depends_on: ["nats"]
  nats-2:
    image: nats
    ports:
      - "4224:4222"
    command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 --routes=nats://ruser:T0pS3cr3t@nats:6222"
    networks: ["nats"]
    depends_on: ["nats"]

networks:
  nats:
    name: nats
    external: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants