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

Pulsar Proxy HashedWheelTimer and Frame Exception #9783

Closed
xuesongxs opened this issue Mar 3, 2021 · 2 comments · Fixed by #9802
Closed

Pulsar Proxy HashedWheelTimer and Frame Exception #9783

xuesongxs opened this issue Mar 3, 2021 · 2 comments · Fixed by #9802
Labels
help wanted type/bug The PR fixed a bug or issue reported a bug

Comments

@xuesongxs
Copy link
Contributor

Describe the bug
image

image

@codelipenghui
Copy link
Contributor

Thanks @xuesongxs . Seems the problem is the proxy creates a Pulsar client for each connection since the proxy need to do the authentication by the client. Since each Pulsar client will create a HashedWheelTimer, so the error occurs and more HashedWheelTimer will waste a lot of cpu cycles(the tick time is 1ms in the Pulsar client).

I think we should make the HashedWheelTimer static in the Pulsar client.

codelipenghui pushed a commit that referenced this issue Mar 29, 2021
#9802)

Fixed #9783

### Motivation

Allow pulsar client to receive external timer instance

### Modifications

Add new constructor to provide an external timer, and share timer in pulsar proxy

### Verifying this change
- [x] Make sure that the change passes the CI checks.
@codelipenghui codelipenghui reopened this Mar 29, 2021
codelipenghui pushed a commit that referenced this issue Mar 30, 2021
#9802)

Fixed #9783

Allow pulsar client to receive external timer instance

Add new constructor to provide an external timer, and share timer in pulsar proxy

- [x] Make sure that the change passes the CI checks.

(cherry picked from commit af6eaba)
codelipenghui pushed a commit that referenced this issue Mar 30, 2021
#9802)

Fixed #9783

Allow pulsar client to receive external timer instance

Add new constructor to provide an external timer, and share timer in pulsar proxy

- [x] Make sure that the change passes the CI checks.

(cherry picked from commit af6eaba)
@lhotari
Copy link
Member

lhotari commented Jan 19, 2022

It turns out the PulsarClientImpl isn't needed at all in Pulsar Proxy. There's a PR #13836 to optimize the resource usage of Pulsar Proxy. This reduces 2 threads per proxied connection which will help improve Pulsar Proxy scalability. Please review #13836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants