diff --git a/consumer/src/solana.rs b/consumer/src/solana.rs index 0ce1681..56cabb5 100644 --- a/consumer/src/solana.rs +++ b/consumer/src/solana.rs @@ -70,7 +70,8 @@ macro_rules! with_retry { &ExponentialBuilder::default() .with_jitter() .with_min_delay(Duration::from_millis(30)) - .with_max_times(15), + .with_max_delay(Duration::from_secs(1)) + .with_max_times(25), ) .notify(|err: &ClientError, dur: Duration| { error!("retrying error {:?} in {:?}", err, dur); @@ -273,7 +274,9 @@ impl Solana { message, }; - let signature = with_retry!(self.rpc().send_transaction(&transaction)) + let signature = with_retry!(self.rpc().send_transaction_with_config(&transaction, RpcSendTransactionConfig { + skip_preflight: true, ..Default::default() + })) .when(|e| { !matches!(e.kind, ClientErrorKind::TransactionError(_) | ClientErrorKind::SigningError(_)| ClientErrorKind::RpcError(RpcError::RpcResponseError { data: solana_client::rpc_request::RpcResponseErrorData::SendTransactionPreflightFailure(_), diff --git a/core/src/db.rs b/core/src/db.rs index 18ce10b..66c33c6 100644 --- a/core/src/db.rs +++ b/core/src/db.rs @@ -10,9 +10,9 @@ pub struct DbArgs { pub max_connections: u32, #[arg(long, env, default_value_t = 60)] pub connection_timeout: u64, - #[arg(long, env, default_value_t = 10)] + #[arg(long, env, default_value_t = 60)] pub acquire_timeout: u64, - #[arg(long, env, default_value_t = 10)] + #[arg(long, env, default_value_t = 20)] pub idle_timeout: u64, #[arg(long, env)] pub database_url: String,