Closed haaawk closed 2 months ago
Some more logs:
2024-08-19T08:12:51.783229Z DEBUG libsql_replication::replicator: Attempting to perform handshake with primary.
2024-08-19T08:12:51.783929Z INFO libsql::replication::remote_client: Attempting to perform handshake with primary.
2024-08-19T08:12:51.788755Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: tower_http::trace::on_request: started processing request
2024-08-19T08:12:51.788804Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: tonic_web::client: coercing HTTP2 request to HTTP1.1
2024-08-19T08:12:51.791811Z DEBUG hyper::client::connect::dns: resolving host="foo-ospfranco.turso.io"
2024-08-19T08:12:51.862667Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: hyper::client::connect::http: connecting to 66.51.123.211:443
2024-08-19T08:12:51.905776Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: hyper::client::connect::http: connected to 66.51.123.211:443
2024-08-19T08:12:51.906370Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::hs: No cached session for DnsName("foo-ospfranco.turso.io")
2024-08-19T08:12:51.908643Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::hs: Not resuming any session
2024-08-19T08:12:51.964482Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::hs: Using ciphersuite TLS13_AES_256_GCM_SHA384
2024-08-19T08:12:51.965500Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::tls13: Not resuming
2024-08-19T08:12:51.966351Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::tls13: TLS1.3 encrypted extensions: [ServerNameAck]
2024-08-19T08:12:51.966402Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: rustls::client::hs: ALPN protocol is None
2024-08-19T08:12:51.979113Z DEBUG hyper::proto::h1::io: flushed 497 bytes
2024-08-19T08:13:02.205164Z DEBUG hyper::proto::h1::io: parsed 7 headers
2024-08-19T08:13:02.205225Z DEBUG hyper::proto::h1::conn: incoming body is empty
2024-08-19T08:13:02.205940Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: hyper::client::pool: pooling idle connection for ("https", foo-ospfranco.turso.io)
2024-08-19T08:13:02.206084Z DEBUG request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: tower_http::trace::on_response: finished processing request latency=10418 ms status=200
2024-08-19T08:13:02.206137Z ERROR request{method=POST uri=https://foo-ospfranco.turso.io/wal_log.ReplicationLog/Hello version=HTTP/2.0}: tower_http::trace::on_failure: response failed classification=Code: 14 latency=10418 ms
2024-08-19T08:13:02.206317Z WARN libsql::replication::remote_client: Failed handshake in 10422 ms: Client(Status { code: Unavailable, message: "bad gateway", metadata: MetadataMap { headers: {"fly-request-id": "01J5MV4D40M7PFB2GCPAZY2WPX-fra", "content-length": "0", "date": "Mon, 19 Aug 2024 08:13:02 GMT", "server": "Fly/f8a8cc0dd (2024-08-15)", "via": "1.1 fly.io"} }, source: None })
2024-08-19T08:13:02.206367Z ERROR libsql_replication::replicator: error connecting to primary. retrying. error: status: Unavailable, message: "bad gateway", details: [], metadata: MetadataMap { headers: {"fly-request-id": "01J5MV4D40M7PFB2GCPAZY2WPX-fra", "content-length": "0", "date": "Mon, 19 Aug 2024 08:13:02 GMT", "server": "Fly/f8a8cc0dd (2024-08-15)", "via": "1.1 fly.io"} }
2024-08-19T08:13:03.207651Z DEBUG libsql_replication::replicator: Attempting to perform handshake with primary.
2024-08-19T08:13:03.207716Z INFO libsql::replication::remote_client: Attempting to perform handshake with primary.
the request fails fast but we retry 100 times with 1s sleep in between. @LucioFranco why do we rety for so long? In this case the db is just dead. Is there a way to be able to return an error quicker?
Having
Cargo.toml
:and
main.rs
:the program returns:
Timeouts must be misconfigured on the hello request I assume.