Minor changes, increasing default lite-rpc limits
This commit is contained in:
parent
41b193d10a
commit
7d39a947ac
|
@ -42,7 +42,7 @@ pub struct AccountsOnDemand {
|
|||
accounts_subscribed: Arc<DashSet<Pubkey>>,
|
||||
program_filters: Arc<RwLock<AccountFilters>>,
|
||||
subscription_manager: SubscriptionManger,
|
||||
accounts_is_loading: Arc<Mutex<HashMap<Pubkey, Arc<Notify>>>>,
|
||||
accounts_in_loading: Arc<Mutex<HashMap<Pubkey, Arc<Notify>>>>,
|
||||
}
|
||||
|
||||
impl AccountsOnDemand {
|
||||
|
@ -62,7 +62,7 @@ impl AccountsOnDemand {
|
|||
accounts_storage,
|
||||
account_notification_sender,
|
||||
),
|
||||
accounts_is_loading: Arc::new(Mutex::new(HashMap::new())),
|
||||
accounts_in_loading: Arc::new(Mutex::new(HashMap::new())),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ impl AccountStorageInterface for AccountsOnDemand {
|
|||
// account does not exist in account store
|
||||
// first check if we have already subscribed to the required account
|
||||
// This is to avoid resetting geyser subscription because of accounts that do not exists.
|
||||
let mut lk = self.accounts_is_loading.lock().await;
|
||||
let mut lk = self.accounts_in_loading.lock().await;
|
||||
match lk.get(&account_pk).cloned() {
|
||||
Some(loading_account) => {
|
||||
drop(lk);
|
||||
|
@ -192,7 +192,7 @@ impl AccountStorageInterface for AccountsOnDemand {
|
|||
}
|
||||
// update loading lock
|
||||
{
|
||||
let mut write_lock = self.accounts_is_loading.lock().await;
|
||||
let mut write_lock = self.accounts_in_loading.lock().await;
|
||||
let notify = write_lock.remove(&account_pk);
|
||||
drop(write_lock);
|
||||
if let Some(notify) = notify {
|
||||
|
|
|
@ -391,7 +391,7 @@ pub fn create_grpc_multiplex_blocks_subscription(
|
|||
log::error!("block or block info geyser stream stopped - restarting multiplexer ({}-{}-{})",
|
||||
cleanup_without_recv_full_blocks, cleanup_without_confirmed_recv_blocks_meta, cleanup_without_finalized_recv_blocks_meta,);
|
||||
// throttle a bit
|
||||
sleep(Duration::from_millis(1500)).await;
|
||||
sleep(Duration::from_millis(200)).await;
|
||||
break 'recv_loop;
|
||||
}
|
||||
cleanup_without_recv_full_blocks += 1;
|
||||
|
|
|
@ -21,9 +21,9 @@ pub struct ServerConfiguration {
|
|||
impl Default for ServerConfiguration {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
max_request_body_size: 50 * (1 << 10), // 50kb
|
||||
max_response_body_size: 50_000 * (1 << 10), // 50MB response size
|
||||
max_connection: 10000,
|
||||
max_request_body_size: 50 * (1 << 10), // 50kb
|
||||
max_response_body_size: 500_000 * (1 << 10), // 500MB response size
|
||||
max_connection: 1000000,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue