nostr-rs-relay
nostr-rs-relay copied to clipboard
Relay dies and doesn't come back up (PostgreSQL)
Just testing nostr-rs-relay, and threw some traffic at it. I managed to get it into a state where the app is now unusable, as it will never resume listening for new traffic even when restarted. Here's the error message:
thread 'tokio-ws-4' panicked at src/repo/postgres.rs:200:34:
called `Result::unwrap()` on an `Err` value: Database(PgDatabaseError { severity: Error, code: "54000", message: "index row size 4544 exceeds btree version 4 maximum 2704 for index \"tag_value_idx\"", detail: Some("Index row references tuple (72445,9) in relation \"tag\"."), hint: Some("Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing."), position: None, where: None, schema: Some("public"), table: Some("tag"), column: None, data_type: None, constraint: Some("tag_value_idx"), file: Some("nbtutils.c"), line: Some(2678), routine: Some("_bt_check_third_page") })
stack backtrace:
0: rust_begin_unwind
at /build/rustc-kAv1jW/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /build/rustc-kAv1jW/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /build/rustc-kAv1jW/rustc-1.75.0+dfsg0ubuntu1~bpo0/library/core/src/result.rs:1653:5
3: <nostr_rs_relay::repo::postgres::PostgresRepo as nostr_rs_relay::repo::NostrRepo>::write_event::{{closure}}
4: nostr_rs_relay::db::db_writer::{{closure}}
5: tokio::runtime::task::core::Core<T,S>::poll
6: tokio::runtime::task::harness::Harness<T,S>::poll
7: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
8: tokio::runtime::scheduler::multi_thread::worker::Context::run
9: tokio::runtime::context::runtime::enter_runtime
10: tokio::runtime::scheduler::multi_thread::worker::run
11: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
12: tokio::runtime::task::core::Core<T,S>::poll
13: tokio::runtime::task::harness::Harness<T,S>::poll
14: tokio::runtime::blocking::pool::Inner::run