Skip to content

Commit

Permalink
Log stream ID limit exceeded error in Liger
Browse files Browse the repository at this point in the history
Summary: We are seeing more stream ID limit exceeded errors in MNS. Liger does not show this error because it silently fallback to TCP without raising QUIC error in this case. We want to confirm if Liger never fails to open QUIC stream or it is just hided.

Differential Revision: D49188887

fbshipit-source-id: 21434e252838c39d6fa304dd251deae20421dd75
  • Loading branch information
Hyunji Choi (SWE) authored and facebook-github-bot committed Sep 24, 2023
1 parent 5a944c9 commit aa5588c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxygen/lib/http/session/HQSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2194,6 +2194,7 @@ void HQSession::HQStreamTransportBase::initIngress(const std::string& where) {
HTTPTransaction* FOLLY_NULLABLE
HQSession::newTransaction(HTTPTransaction::Handler* handler) {
VLOG(4) << __func__ << " sess=" << *this;
setStreamLimitExceeded(false);

if (drainState_ == DrainState::CLOSE_SENT ||
drainState_ == DrainState::FIRST_GOAWAY ||
Expand All @@ -2210,6 +2211,7 @@ HQSession::newTransaction(HTTPTransaction::Handler* handler) {
auto quicStreamId = sock_->createBidirectionalStream();
if (!quicStreamId) {
VLOG(2) << __func__ << " failed to create new stream: " << this;
setStreamLimitExceeded(true);
return nullptr;
}

Expand Down
13 changes: 13 additions & 0 deletions proxygen/lib/http/session/HTTPSessionBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ class HTTPSessionBase : public wangle::ManagedConnection {
return transactionSeqNo_;
}

[[nodiscard]] bool getStreamLimitExceeded() const {
return streamLimitExceeded_;
}

[[nodiscard]] std::chrono::seconds getLatestIdleTime() const /*override*/ {
DCHECK_GT(transactionSeqNo_, 0u)
<< "No idle time for the first transaction";
Expand Down Expand Up @@ -629,6 +633,10 @@ class HTTPSessionBase : public wangle::ManagedConnection {
++transactionSeqNo_;
}

void setStreamLimitExceeded(bool streamLimitExceeded) {
streamLimitExceeded_ = streamLimitExceeded;
}

void onNewOutgoingStream(uint32_t outgoingStreams) {
if (outgoingStreams > historicalMaxOutgoingStreams_) {
historicalMaxOutgoingStreams_ = outgoingStreams;
Expand Down Expand Up @@ -823,6 +831,11 @@ class HTTPSessionBase : public wangle::ManagedConnection {
* Indicates whether Ex Headers is supported in HTTPSession
*/
bool exHeadersEnabled_ : 1;

/**
* Indicates whether quic stream ID limit is exceeded.
*/
bool streamLimitExceeded_{false};
};

} // namespace proxygen

0 comments on commit aa5588c

Please sign in to comment.