Skip to content

Set timeouts on admin requests - #564

Closed
sschepens wants to merge 1 commit into
apache:masterfrom
sschepens:admin_timeouts
Closed

sschepens wants to merge 1 commit into
apache:masterfrom
sschepens:admin_timeouts

Conversation

@sschepens

Copy link
Copy Markdown
Contributor

PulsarAdmin requests seem to not have any timeouts set, use pulsarConfig.getOperationTimeoutMs() to set request timeout and set a default connect timeout of 5 sec.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Should we add it as command line param as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably

@sschepens

Copy link
Copy Markdown
Contributor Author

This is somehow causing NPEs inside Jersey... investigating

@sschepens

Copy link
Copy Markdown
Contributor Author

Ok, jersey aws expecting an int and faild with long apparently, I now cast it to int, failing if it overflows

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Jul 14, 2017
@merlimat merlimat added this to the 1.19.0-incubating milestone Jul 14, 2017
@merlimat

Copy link
Copy Markdown
Contributor

@sschepens Change looks good. As @saandrews was saying, can you also make the timeout configurable in the CLI tool at PulsarAdminTool.java?

@sschepens

Copy link
Copy Markdown
Contributor Author

Yes, I've been busy, I made this change mostly because brokers use PulsarAdmin internally, and found that sometimes requests hang for a very long time.

@merlimat

Copy link
Copy Markdown
Contributor

@sschepens No problem. The only tricky part is that there might be some admin call that are taking ~30sec. For example, when unloading a namespace that has many (thousands of) topics, it can take ~10sec.

Also, some of the REST calls (eg: clearing backlog on whole namespace) are actually generating multiple internal REST calls (eg: one per bundle) and that can add up to the total time.

That's why I'm a bit worried about the 30sec :) . In any case, I totally agree we need to have a max on it.

@dave2wave

Copy link
Copy Markdown
Member

This PR is evidently stale or abandoned. Reopen if this is not so.

@dave2wave dave2wave closed this Dec 16, 2021
@github-actions

Copy link
Copy Markdown

@sschepens:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-label-missing type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants