mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
Fix: admin RPC webhook queue limit removal and timeout reduction (#5163)
When using subscribe at admin RPC port to send webhooks for the transaction stream to a backend, on large(r) ledgers the endpoint receives fewer HTTP POSTs with TX information than the amount of transactions in a ledger. This change removes the hardcoded queue length to avoid dropping TX notifications for the admin-only command. In addition, the per-request TTL for outgoing RPC HTTP calls has been reduced from 10 minutes to 30 seconds.
This commit is contained in:
@@ -1663,7 +1663,7 @@ fromNetwork(
|
||||
constexpr auto RPC_REPLY_MAX_BYTES = megabytes(256);
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
auto constexpr RPC_NOTIFY = 10min;
|
||||
auto constexpr RPC_WEBHOOK_TIMEOUT = 30s;
|
||||
|
||||
HTTPClient::request(
|
||||
bSSL,
|
||||
@@ -1680,7 +1680,7 @@ fromNetwork(
|
||||
std::placeholders::_2,
|
||||
j),
|
||||
RPC_REPLY_MAX_BYTES,
|
||||
RPC_NOTIFY,
|
||||
RPC_WEBHOOK_TIMEOUT,
|
||||
std::bind(
|
||||
&RPCCallImp::onResponse,
|
||||
callbackFuncP,
|
||||
|
||||
@@ -80,13 +80,6 @@ public:
|
||||
{
|
||||
std::lock_guard sl(mLock);
|
||||
|
||||
if (mDeque.size() >= eventQueueMax)
|
||||
{
|
||||
// Drop the previous event.
|
||||
JLOG(j_.warn()) << "RPCCall::fromNetwork drop";
|
||||
mDeque.pop_back();
|
||||
}
|
||||
|
||||
auto jm = broadcast ? j_.debug() : j_.info();
|
||||
JLOG(jm) << "RPCCall::fromNetwork push: " << jvObj;
|
||||
|
||||
@@ -184,8 +177,6 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
enum { eventQueueMax = 32 };
|
||||
|
||||
boost::asio::io_service& m_io_service;
|
||||
JobQueue& m_jobQueue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user