qvisa_stg exited with code 0 > qvisa_stg exited with code 139
qvisa_stg | 2025-03-15T02:07:24.073008Z INFO qvisa: 701: Starting the application... qvisa_stg | 2025-03-15T02:07:24.073027Z DEBUG qvisa::database: 14: Attempting to retrieve the database pool... qvisa_stg | 2025-03-15T02:07:24.073035Z INFO qvisa::database: 27: Initializing the database pool... qvisa_stg | 2025-03-15T02:07:24.073145Z INFO qvisa::database: 58: Database configuration - host: pgbouncer, port: 6432, dbname: faster_visa qvisa_stg | 2025-03-15T02:07:24.073169Z INFO qvisa::database: 34: Database connection manager created successfully. qvisa_stg | 2025-03-15T02:07:24.073259Z INFO qvisa::database: 44: Database connection pool built successfully. qvisa_stg | 2025-03-15T02:07:24.073271Z INFO qvisa: 705: Database pool initialized successfully. qvisa_stg | 2025-03-15T02:07:24.073276Z INFO qvisa: 715: Fetching FCM manager... qvisa_stg | 2025-03-15T02:07:24.073352Z INFO qvisa::fcm_manager: 47: Initializing FCMManager... qvisa_stg | 2025-03-15T02:07:24.096212Z INFO qvisa::fcm_manager: 60: FCMManager initialized successfully qvisa_stg | 2025-03-15T02:07:24.096229Z INFO qvisa: 717: FCM manager fetched successfully. qvisa_stg | 2025-03-15T02:07:24.096234Z INFO qvisa: 719: Fetching Firestore service... qvisa_stg | 2025-03-15T02:07:24.096241Z INFO qvisa::fb_db_service: 39: Initializing Firestore with project ID: qvisa-verified-fid qvisa_stg | 2025-03-15T02:07:24.096262Z INFO firestore::db: 162: Creating a new database client. database_path="projects/qvisa-verified-fid/databases/(default)" api_url="https://firestore.googleapis.com" token_scopes="https://www.googleapis.com/auth/cloud-platform" qvisa_stg | 2025-03-15T02:07:24.096277Z DEBUG gcloud_sdk::api_client: 45: Creating a new Google API client for https://firestore.googleapis.com. Scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:24.096485Z TRACE tonic::transport::channel::service::reconnect: 73: poll_ready; idle qvisa_stg | 2025-03-15T02:07:24.096497Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:24.096504Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("firestore.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:24.096623Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:24.098109Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:24.098153Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.209.170:443 qvisa_stg | 2025-03-15T02:07:24.098272Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:24.099044Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:24.099096Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.209.170:443 qvisa_stg | 2025-03-15T02:07:24.099300Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:24.102611Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:24.104104Z DEBUG h2::client: 1290: binding client connection qvisa_stg | 2025-03-15T02:07:24.104148Z DEBUG h2::client: 1295: client connection bound qvisa_stg | 2025-03-15T02:07:24.104255Z DEBUG FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:24.104265Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 218: encoding SETTINGS; len=24 qvisa_stg | 2025-03-15T02:07:24.104272Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=EnablePush(0) qvisa_stg | 2025-03-15T02:07:24.104276Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=InitialWindowSize(2097152) qvisa_stg | 2025-03-15T02:07:24.104281Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxFrameSize(16384) qvisa_stg | 2025-03-15T02:07:24.104285Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxHeaderListSize(16384) qvisa_stg | 2025-03-15T02:07:24.104289Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 262: encoded settings rem=33 qvisa_stg | 2025-03-15T02:07:24.104300Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:24.104303Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:24.104307Z TRACE h2::proto::streams::prioritize: 94: Prioritize::new; flow=FlowControl { window_size: Window(65535), available: Window(65535) } qvisa_stg | 2025-03-15T02:07:24.104317Z TRACE h2::proto::streams::recv: 467: set_target_connection_window; target=5242880; available=65535, reserved=0 qvisa_stg | 2025-03-15T02:07:24.104330Z TRACE tonic::transport::channel::service::reconnect: 113: poll_ready; connected qvisa_stg | 2025-03-15T02:07:24.104333Z TRACE tonic::transport::channel::service::reconnect: 119: poll_ready; ready qvisa_stg | 2025-03-15T02:07:24.104352Z DEBUG gcloud_sdk::token_source: 61: Finding default token for scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:24.104363Z DEBUG gcloud_sdk::token_source::credentials: 156: Reading credentials from file: "/usr/src/qvisa/src/credentials/qvisa-verified-fid-firebase-adminsdk-fbsvc-bd10742c81.json" qvisa_stg | 2025-03-15T02:07:24.104430Z DEBUG gcloud_sdk::token_source: 64: Creating token based on environment variable: GOOGLE_APPLICATION_CREDENTIALS qvisa_stg | 2025-03-15T02:07:24.104441Z INFO qvisa: 722: Firestore service initialized successfully. qvisa_stg | 2025-03-15T02:07:24.114644Z TRACE hyper_util::client::legacy::pool: 671: checkout waiting for idle connection: ("https", oauth2.googleapis.com) qvisa_stg | 2025-03-15T02:07:24.114697Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("oauth2.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:24.114752Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:24.114772Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.114809Z DEBUG Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 213: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 } qvisa_stg | 2025-03-15T02:07:24.114822Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::frame::window_update: 51: encoding WINDOW_UPDATE; id=StreamId(0) qvisa_stg | 2025-03-15T02:07:24.114832Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 274: encoded window_update rem=46 qvisa_stg | 2025-03-15T02:07:24.114845Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=5177345; old=65535; new=5242880 qvisa_stg | 2025-03-15T02:07:24.114859Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:24.114869Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:24.114880Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:24.114972Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:24.115001Z TRACE tower::buffer::worker: 108: worker polling for next message qvisa_stg | 2025-03-15T02:07:24.115019Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:24.115030Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.115141Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=27 qvisa_stg | 2025-03-15T02:07:24.115165Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 132: decoding frame from 27B qvisa_stg | 2025-03-15T02:07:24.115249Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:24.115270Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:24.115279Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:24.115298Z DEBUG Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:24.115306Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::frame::settings: 218: encoding SETTINGS; len=0 qvisa_stg | 2025-03-15T02:07:24.115314Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 262: encoded settings rem=9 qvisa_stg | 2025-03-15T02:07:24.115323Z TRACE Connection{peer=Client}:poll:poll_ready: h2::proto::settings: 134: ACK sent; applying settings qvisa_stg | 2025-03-15T02:07:24.115332Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.115337Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=13 qvisa_stg | 2025-03-15T02:07:24.115345Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 132: decoding frame from 13B qvisa_stg | 2025-03-15T02:07:24.115352Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 144: frame.kind=WindowUpdate qvisa_stg | 2025-03-15T02:07:24.115365Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:24.115374Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 540: recv WINDOW_UPDATE frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:24.115380Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=983041; old=65535; new=1048576 qvisa_stg | 2025-03-15T02:07:24.115394Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.115407Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:24.115412Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:24.115421Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:24.115476Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:24.115916Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:24.115937Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.115964Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=9 qvisa_stg | 2025-03-15T02:07:24.115975Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 132: decoding frame from 9B qvisa_stg | 2025-03-15T02:07:24.115982Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:24.116006Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:24.116015Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:24.116028Z DEBUG Connection{peer=Client}:poll: h2::proto::settings: 56: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:24.116034Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 514: update_initial_window_size; new=2097152; old=65535 qvisa_stg | 2025-03-15T02:07:24.116040Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 549: incrementing all windows; inc=2031617 qvisa_stg | 2025-03-15T02:07:24.116049Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:24.116061Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:24.116090Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:24.116102Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:24.123412Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.211.234:443 qvisa_stg exited with code 0 qvisa_stg | 2025-03-15T02:07:26.191009Z INFO qvisa::fcm_manager: 60: FCMManager initialized successfully qvisa_stg | 2025-03-15T02:07:26.191251Z INFO qvisa: 717: FCM manager fetched successfully. qvisa_stg | 2025-03-15T02:07:26.191825Z INFO qvisa: 719: Fetching Firestore service... qvisa_stg | 2025-03-15T02:07:26.191850Z INFO qvisa::fb_db_service: 39: Initializing Firestore with project ID: qvisa-verified-fid qvisa_stg | 2025-03-15T02:07:26.191888Z INFO firestore::db: 162: Creating a new database client. database_path="projects/qvisa-verified-fid/databases/(default)" api_url="https://firestore.googleapis.com" token_scopes="https://www.googleapis.com/auth/cloud-platform" qvisa_stg | 2025-03-15T02:07:26.191909Z DEBUG gcloud_sdk::api_client: 45: Creating a new Google API client for https://firestore.googleapis.com. Scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:26.192021Z TRACE tonic::transport::channel::service::reconnect: 73: poll_ready; idle qvisa_stg | 2025-03-15T02:07:26.192031Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:26.192052Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("firestore.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:26.192164Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:26.196577Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:26.196618Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.211.234:443 qvisa_stg | 2025-03-15T02:07:26.196727Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:26.202506Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:26.202561Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.211.234:443 qvisa_stg | 2025-03-15T02:07:26.202794Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:26.207983Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:26.209731Z DEBUG h2::client: 1290: binding client connection qvisa_stg | 2025-03-15T02:07:26.210614Z DEBUG h2::client: 1295: client connection bound qvisa_stg | 2025-03-15T02:07:26.210707Z DEBUG FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:26.210717Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 218: encoding SETTINGS; len=24 qvisa_stg | 2025-03-15T02:07:26.210723Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=EnablePush(0) qvisa_stg | 2025-03-15T02:07:26.210728Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=InitialWindowSize(2097152) qvisa_stg | 2025-03-15T02:07:26.210731Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxFrameSize(16384) qvisa_stg | 2025-03-15T02:07:26.210735Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxHeaderListSize(16384) qvisa_stg | 2025-03-15T02:07:26.210739Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 262: encoded settings rem=33 qvisa_stg | 2025-03-15T02:07:26.210749Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:26.210753Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:26.210756Z TRACE h2::proto::streams::prioritize: 94: Prioritize::new; flow=FlowControl { window_size: Window(65535), available: Window(65535) } qvisa_stg | 2025-03-15T02:07:26.210766Z TRACE h2::proto::streams::recv: 467: set_target_connection_window; target=5242880; available=65535, reserved=0 qvisa_stg | 2025-03-15T02:07:26.210781Z TRACE tonic::transport::channel::service::reconnect: 113: poll_ready; connected qvisa_stg | 2025-03-15T02:07:26.210785Z TRACE tonic::transport::channel::service::reconnect: 119: poll_ready; ready qvisa_stg | 2025-03-15T02:07:26.210799Z DEBUG gcloud_sdk::token_source: 61: Finding default token for scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:26.210809Z DEBUG gcloud_sdk::token_source::credentials: 156: Reading credentials from file: "/usr/src/qvisa/src/credentials/qvisa-verified-fid-firebase-adminsdk-fbsvc-bd10742c81.json" qvisa_stg | 2025-03-15T02:07:26.210875Z DEBUG gcloud_sdk::token_source: 64: Creating token based on environment variable: GOOGLE_APPLICATION_CREDENTIALS qvisa_stg | 2025-03-15T02:07:26.210885Z INFO qvisa: 722: Firestore service initialized successfully. qvisa_stg | 2025-03-15T02:07:26.236781Z TRACE hyper_util::client::legacy::pool: 671: checkout waiting for idle connection: ("https", oauth2.googleapis.com) qvisa_stg | 2025-03-15T02:07:26.236836Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("oauth2.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:26.236891Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:26.236914Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.236954Z DEBUG Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 213: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 } qvisa_stg | 2025-03-15T02:07:26.236965Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::frame::window_update: 51: encoding WINDOW_UPDATE; id=StreamId(0) qvisa_stg | 2025-03-15T02:07:26.236973Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 274: encoded window_update rem=46 qvisa_stg | 2025-03-15T02:07:26.236985Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=5177345; old=65535; new=5242880 qvisa_stg | 2025-03-15T02:07:26.236995Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:26.237003Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:26.237014Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:26.237150Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:26.237187Z TRACE tower::buffer::worker: 108: worker polling for next message qvisa_stg | 2025-03-15T02:07:26.237206Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:26.237216Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.237278Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=27 qvisa_stg | 2025-03-15T02:07:26.237294Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 132: decoding frame from 27B qvisa_stg | 2025-03-15T02:07:26.237313Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:26.237331Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:26.237339Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:26.237357Z DEBUG Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:26.237369Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::frame::settings: 218: encoding SETTINGS; len=0 qvisa_stg | 2025-03-15T02:07:26.237377Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 262: encoded settings rem=9 qvisa_stg | 2025-03-15T02:07:26.237385Z TRACE Connection{peer=Client}:poll:poll_ready: h2::proto::settings: 134: ACK sent; applying settings qvisa_stg | 2025-03-15T02:07:26.237393Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.237398Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=13 qvisa_stg | 2025-03-15T02:07:26.237405Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 132: decoding frame from 13B qvisa_stg | 2025-03-15T02:07:26.237411Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 144: frame.kind=WindowUpdate qvisa_stg | 2025-03-15T02:07:26.237423Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:26.237430Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 540: recv WINDOW_UPDATE frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:26.237436Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=983041; old=65535; new=1048576 qvisa_stg | 2025-03-15T02:07:26.237449Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.237459Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:26.237463Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:26.237471Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:26.237519Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:26.238104Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:26.238138Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.238175Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=9 qvisa_stg | 2025-03-15T02:07:26.238187Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 132: decoding frame from 9B qvisa_stg | 2025-03-15T02:07:26.238193Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:26.238216Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:26.238224Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:26.238237Z DEBUG Connection{peer=Client}:poll: h2::proto::settings: 56: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:26.238243Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 514: update_initial_window_size; new=2097152; old=65535 qvisa_stg | 2025-03-15T02:07:26.238248Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 549: incrementing all windows; inc=2031617 qvisa_stg | 2025-03-15T02:07:26.238256Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:26.238266Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:26.238272Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:26.238280Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:26.238765Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.210.138:443 qvisa_stg | 2025-03-15T02:07:26.239926Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.210.138:443 qvisa_stg exited with code 0 qvisa_stg | 2025-03-15T02:07:28.230019Z INFO qvisa: 701: Starting the application... qvisa_stg | 2025-03-15T02:07:28.230033Z DEBUG qvisa::database: 14: Attempting to retrieve the database pool... qvisa_stg | 2025-03-15T02:07:28.230040Z INFO qvisa::database: 27: Initializing the database pool... qvisa_stg | 2025-03-15T02:07:28.230256Z INFO qvisa::database: 58: Database configuration - host: pgbouncer, port: 6432, dbname: faster_visa qvisa_stg | 2025-03-15T02:07:28.230283Z INFO qvisa::database: 34: Database connection manager created successfully. qvisa_stg | 2025-03-15T02:07:28.230315Z INFO qvisa::database: 44: Database connection pool built successfully. qvisa_stg | 2025-03-15T02:07:28.230326Z INFO qvisa: 705: Database pool initialized successfully. qvisa_stg | 2025-03-15T02:07:28.230331Z INFO qvisa: 715: Fetching FCM manager... qvisa_stg | 2025-03-15T02:07:28.230347Z INFO qvisa::fcm_manager: 47: Initializing FCMManager... qvisa_stg | 2025-03-15T02:07:28.245060Z INFO qvisa::fcm_manager: 60: FCMManager initialized successfully qvisa_stg | 2025-03-15T02:07:28.245116Z INFO qvisa: 717: FCM manager fetched successfully. qvisa_stg | 2025-03-15T02:07:28.245121Z INFO qvisa: 719: Fetching Firestore service... qvisa_stg | 2025-03-15T02:07:28.245128Z INFO qvisa::fb_db_service: 39: Initializing Firestore with project ID: qvisa-verified-fid qvisa_stg | 2025-03-15T02:07:28.245153Z INFO firestore::db: 162: Creating a new database client. database_path="projects/qvisa-verified-fid/databases/(default)" api_url="https://firestore.googleapis.com" token_scopes="https://www.googleapis.com/auth/cloud-platform" qvisa_stg | 2025-03-15T02:07:28.245163Z DEBUG gcloud_sdk::api_client: 45: Creating a new Google API client for https://firestore.googleapis.com. Scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:28.245223Z TRACE tonic::transport::channel::service::reconnect: 73: poll_ready; idle qvisa_stg | 2025-03-15T02:07:28.245237Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:28.245248Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("firestore.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:28.245289Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:28.247697Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:28.247744Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.211.234:443 qvisa_stg | 2025-03-15T02:07:28.247958Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:28.249024Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:28.249135Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.211.234:443 qvisa_stg | 2025-03-15T02:07:28.249417Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:28.253028Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:28.254309Z DEBUG h2::client: 1290: binding client connection qvisa_stg | 2025-03-15T02:07:28.254380Z DEBUG h2::client: 1295: client connection bound qvisa_stg | 2025-03-15T02:07:28.254439Z DEBUG FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:28.254449Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 218: encoding SETTINGS; len=24 qvisa_stg | 2025-03-15T02:07:28.254456Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=EnablePush(0) qvisa_stg | 2025-03-15T02:07:28.254461Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=InitialWindowSize(2097152) qvisa_stg | 2025-03-15T02:07:28.254465Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxFrameSize(16384) qvisa_stg | 2025-03-15T02:07:28.254469Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxHeaderListSize(16384) qvisa_stg | 2025-03-15T02:07:28.254474Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 262: encoded settings rem=33 qvisa_stg | 2025-03-15T02:07:28.254484Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:28.254488Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:28.254491Z TRACE h2::proto::streams::prioritize: 94: Prioritize::new; flow=FlowControl { window_size: Window(65535), available: Window(65535) } qvisa_stg | 2025-03-15T02:07:28.254501Z TRACE h2::proto::streams::recv: 467: set_target_connection_window; target=5242880; available=65535, reserved=0 qvisa_stg | 2025-03-15T02:07:28.254515Z TRACE tonic::transport::channel::service::reconnect: 113: poll_ready; connected qvisa_stg | 2025-03-15T02:07:28.254518Z TRACE tonic::transport::channel::service::reconnect: 119: poll_ready; ready qvisa_stg | 2025-03-15T02:07:28.254552Z DEBUG gcloud_sdk::token_source: 61: Finding default token for scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:28.254578Z DEBUG gcloud_sdk::token_source::credentials: 156: Reading credentials from file: "/usr/src/qvisa/src/credentials/qvisa-verified-fid-firebase-adminsdk-fbsvc-bd10742c81.json" qvisa_stg | 2025-03-15T02:07:28.254666Z DEBUG gcloud_sdk::token_source: 64: Creating token based on environment variable: GOOGLE_APPLICATION_CREDENTIALS qvisa_stg | 2025-03-15T02:07:28.254692Z INFO qvisa: 722: Firestore service initialized successfully. qvisa_stg | 2025-03-15T02:07:28.266035Z TRACE hyper_util::client::legacy::pool: 671: checkout waiting for idle connection: ("https", oauth2.googleapis.com) qvisa_stg | 2025-03-15T02:07:28.266140Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("oauth2.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:28.266365Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:28.266387Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.266469Z DEBUG Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 213: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 } qvisa_stg | 2025-03-15T02:07:28.266479Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::frame::window_update: 51: encoding WINDOW_UPDATE; id=StreamId(0) qvisa_stg | 2025-03-15T02:07:28.266488Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 274: encoded window_update rem=46 qvisa_stg | 2025-03-15T02:07:28.266498Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=5177345; old=65535; new=5242880 qvisa_stg | 2025-03-15T02:07:28.266510Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:28.266516Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:28.266526Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:28.266608Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:28.266631Z TRACE tower::buffer::worker: 108: worker polling for next message qvisa_stg | 2025-03-15T02:07:28.266650Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:28.266660Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.266723Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=27 qvisa_stg | 2025-03-15T02:07:28.266737Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 132: decoding frame from 27B qvisa_stg | 2025-03-15T02:07:28.266758Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:28.266814Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:28.266825Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:28.266860Z DEBUG Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:28.266869Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::frame::settings: 218: encoding SETTINGS; len=0 qvisa_stg | 2025-03-15T02:07:28.266877Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 262: encoded settings rem=9 qvisa_stg | 2025-03-15T02:07:28.266886Z TRACE Connection{peer=Client}:poll:poll_ready: h2::proto::settings: 134: ACK sent; applying settings qvisa_stg | 2025-03-15T02:07:28.266895Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.266900Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=13 qvisa_stg | 2025-03-15T02:07:28.266909Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 132: decoding frame from 13B qvisa_stg | 2025-03-15T02:07:28.266916Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 144: frame.kind=WindowUpdate qvisa_stg | 2025-03-15T02:07:28.266946Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:28.266955Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 540: recv WINDOW_UPDATE frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:28.266962Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=983041; old=65535; new=1048576 qvisa_stg | 2025-03-15T02:07:28.266976Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.266988Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:28.266993Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:28.267001Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:28.267052Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:28.267684Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:28.267709Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.267739Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=9 qvisa_stg | 2025-03-15T02:07:28.267752Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 132: decoding frame from 9B qvisa_stg | 2025-03-15T02:07:28.267760Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:28.267785Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:28.267794Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:28.267807Z DEBUG Connection{peer=Client}:poll: h2::proto::settings: 56: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:28.267813Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 514: update_initial_window_size; new=2097152; old=65535 qvisa_stg | 2025-03-15T02:07:28.267818Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 549: incrementing all windows; inc=2031617 qvisa_stg | 2025-03-15T02:07:28.267828Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:28.267840Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:28.267845Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:28.267854Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:28.272513Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.209.170:443 qvisa_stg | 2025-03-15T02:07:28.273583Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.209.170:443 qvisa_stg exited with code 0 qvisa_stg | 2025-03-15T02:07:30.210734Z INFO qvisa::fcm_manager: 60: FCMManager initialized successfully qvisa_stg | 2025-03-15T02:07:30.210750Z INFO qvisa: 717: FCM manager fetched successfully. qvisa_stg | 2025-03-15T02:07:30.210754Z INFO qvisa: 719: Fetching Firestore service... qvisa_stg | 2025-03-15T02:07:30.210761Z INFO qvisa::fb_db_service: 39: Initializing Firestore with project ID: qvisa-verified-fid qvisa_stg | 2025-03-15T02:07:30.210778Z INFO firestore::db: 162: Creating a new database client. database_path="projects/qvisa-verified-fid/databases/(default)" api_url="https://firestore.googleapis.com" token_scopes="https://www.googleapis.com/auth/cloud-platform" qvisa_stg | 2025-03-15T02:07:30.210788Z DEBUG gcloud_sdk::api_client: 45: Creating a new Google API client for https://firestore.googleapis.com. Scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:30.210841Z TRACE tonic::transport::channel::service::reconnect: 73: poll_ready; idle qvisa_stg | 2025-03-15T02:07:30.210845Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:30.210856Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("firestore.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:30.210897Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:30.214492Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:30.214553Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.209.202:443 qvisa_stg | 2025-03-15T02:07:30.214679Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:30.215510Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:30.215623Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.209.202:443 qvisa_stg | 2025-03-15T02:07:30.215964Z TRACE tonic::transport::channel::service::reconnect: 93: poll_ready; not ready qvisa_stg | 2025-03-15T02:07:30.219353Z TRACE tonic::transport::channel::service::reconnect: 87: poll_ready; connecting qvisa_stg | 2025-03-15T02:07:30.221347Z DEBUG h2::client: 1290: binding client connection qvisa_stg | 2025-03-15T02:07:30.221398Z DEBUG h2::client: 1295: client connection bound qvisa_stg | 2025-03-15T02:07:30.221442Z DEBUG FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:30.221451Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 218: encoding SETTINGS; len=24 qvisa_stg | 2025-03-15T02:07:30.221457Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=EnablePush(0) qvisa_stg | 2025-03-15T02:07:30.221461Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=InitialWindowSize(2097152) qvisa_stg | 2025-03-15T02:07:30.221465Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxFrameSize(16384) qvisa_stg | 2025-03-15T02:07:30.221469Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::frame::settings: 224: encoding setting; val=MaxHeaderListSize(16384) qvisa_stg | 2025-03-15T02:07:30.221473Z TRACE FramedWrite::buffer{frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 }}: h2::codec::framed_write: 262: encoded settings rem=33 qvisa_stg | 2025-03-15T02:07:30.221482Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:30.221485Z TRACE h2::proto::streams::flow_control: 124: inc_window; sz=65535; old=0; new=65535 qvisa_stg | 2025-03-15T02:07:30.221488Z TRACE h2::proto::streams::prioritize: 94: Prioritize::new; flow=FlowControl { window_size: Window(65535), available: Window(65535) } qvisa_stg | 2025-03-15T02:07:30.221497Z TRACE h2::proto::streams::recv: 467: set_target_connection_window; target=5242880; available=65535, reserved=0 qvisa_stg | 2025-03-15T02:07:30.221511Z TRACE tonic::transport::channel::service::reconnect: 113: poll_ready; connected qvisa_stg | 2025-03-15T02:07:30.221514Z TRACE tonic::transport::channel::service::reconnect: 119: poll_ready; ready qvisa_stg | 2025-03-15T02:07:30.221532Z DEBUG gcloud_sdk::token_source: 61: Finding default token for scopes: ["https://www.googleapis.com/auth/cloud-platform"] qvisa_stg | 2025-03-15T02:07:30.221542Z DEBUG gcloud_sdk::token_source::credentials: 156: Reading credentials from file: "/usr/src/qvisa/src/credentials/qvisa-verified-fid-firebase-adminsdk-fbsvc-bd10742c81.json" qvisa_stg | 2025-03-15T02:07:30.221615Z DEBUG gcloud_sdk::token_source: 64: Creating token based on environment variable: GOOGLE_APPLICATION_CREDENTIALS qvisa_stg | 2025-03-15T02:07:30.221624Z INFO qvisa: 722: Firestore service initialized successfully. qvisa_stg | 2025-03-15T02:07:30.232205Z TRACE hyper_util::client::legacy::pool: 671: checkout waiting for idle connection: ("https", oauth2.googleapis.com) qvisa_stg | 2025-03-15T02:07:30.232311Z TRACE hyper_util::client::legacy::connect::http: 383: Http::connect; scheme=Some("https"), host=Some("oauth2.googleapis.com"), port=None qvisa_stg | 2025-03-15T02:07:30.232435Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:30.232752Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.232868Z DEBUG Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 213: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 } qvisa_stg | 2025-03-15T02:07:30.232906Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::frame::window_update: 51: encoding WINDOW_UPDATE; id=StreamId(0) qvisa_stg | 2025-03-15T02:07:30.232943Z TRACE Connection{peer=Client}:poll:FramedWrite::buffer{frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }}: h2::codec::framed_write: 274: encoded window_update rem=46 qvisa_stg | 2025-03-15T02:07:30.232967Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=5177345; old=65535; new=5242880 qvisa_stg | 2025-03-15T02:07:30.232978Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:30.232984Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:30.232994Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:30.233052Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:30.233090Z TRACE tower::buffer::worker: 108: worker polling for next message qvisa_stg | 2025-03-15T02:07:30.233111Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:30.233123Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.233184Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=27 qvisa_stg | 2025-03-15T02:07:30.233196Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 132: decoding frame from 27B qvisa_stg | 2025-03-15T02:07:30.233217Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=27}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:30.233273Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:30.233283Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 } qvisa_stg | 2025-03-15T02:07:30.233320Z DEBUG Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 213: send frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:30.233341Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::frame::settings: 218: encoding SETTINGS; len=0 qvisa_stg | 2025-03-15T02:07:30.233350Z TRACE Connection{peer=Client}:poll:poll_ready:FramedWrite::buffer{frame=Settings { flags: (0x1: ACK) }}: h2::codec::framed_write: 262: encoded settings rem=9 qvisa_stg | 2025-03-15T02:07:30.233359Z TRACE Connection{peer=Client}:poll:poll_ready: h2::proto::settings: 134: ACK sent; applying settings qvisa_stg | 2025-03-15T02:07:30.233368Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.233373Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=13 qvisa_stg | 2025-03-15T02:07:30.233380Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 132: decoding frame from 13B qvisa_stg | 2025-03-15T02:07:30.233386Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=13}: h2::codec::framed_read: 144: frame.kind=WindowUpdate qvisa_stg | 2025-03-15T02:07:30.233433Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:30.233441Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 540: recv WINDOW_UPDATE frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 } qvisa_stg | 2025-03-15T02:07:30.233448Z TRACE Connection{peer=Client}:poll: h2::proto::streams::flow_control: 124: inc_window; sz=983041; old=65535; new=1048576 qvisa_stg | 2025-03-15T02:07:30.233462Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.233473Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:30.233478Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:30.233485Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 143: queued_data_frame=false qvisa_stg | 2025-03-15T02:07:30.233539Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:30.233976Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 268: connection.state=Open qvisa_stg | 2025-03-15T02:07:30.234006Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.234029Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 389: read.bytes=9 qvisa_stg | 2025-03-15T02:07:30.234140Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 132: decoding frame from 9B qvisa_stg | 2025-03-15T02:07:30.234149Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next:FramedRead::decode_frame{offset=9}: h2::codec::framed_read: 144: frame.kind=Settings qvisa_stg | 2025-03-15T02:07:30.234242Z DEBUG Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 404: received frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:30.234254Z TRACE Connection{peer=Client}:poll: h2::proto::connection: 514: recv SETTINGS frame=Settings { flags: (0x1: ACK) } qvisa_stg | 2025-03-15T02:07:30.234267Z DEBUG Connection{peer=Client}:poll: h2::proto::settings: 56: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384, max_header_list_size: 16384 } qvisa_stg | 2025-03-15T02:07:30.234273Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 514: update_initial_window_size; new=2097152; old=65535 qvisa_stg | 2025-03-15T02:07:30.234279Z TRACE Connection{peer=Client}:poll: h2::proto::streams::recv: 549: incrementing all windows; inc=2031617 qvisa_stg | 2025-03-15T02:07:30.234289Z TRACE Connection{peer=Client}:poll:FramedRead::poll_next: h2::codec::framed_read: 382: poll qvisa_stg | 2025-03-15T02:07:30.234302Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 528: poll_complete qvisa_stg | 2025-03-15T02:07:30.234307Z TRACE Connection{peer=Client}:poll: h2::proto::streams::prioritize: 890: schedule_pending_open qvisa_stg | 2025-03-15T02:07:30.234316Z TRACE Connection{peer=Client}:poll:FramedWrite::flush: h2::codec::framed_write: 159: flushing buffer qvisa_stg | 2025-03-15T02:07:30.234812Z DEBUG hyper_util::client::legacy::connect::http: 657: connecting to 216.58.211.234:443 qvisa_stg | 2025-03-15T02:07:30.235865Z DEBUG hyper_util::client::legacy::connect::http: 660: connected to 216.58.211.234:443 qvisa_stg exited with code 139
NO idea what is wrong locally work when push to production using Docker and compose server crash :(
#[actix_web::main]
async fn main() -> std::io::Result<()> {
initialize_crypto_for_fbdb();
init_environment().expect("Failed to initialize environment");
// Get the host and port from environment variables, with default fallbacks
let host = env::var("HOST").unwrap_or_else(|_| "0.0.0.0".to_string());
let port = env::var("PORT").unwrap_or_else(|_| "8080".to_string());
let bind_address = format!("{}:{}", host, port);
let (_file_guard, _console_guard) = setup_tracing().await;
tracing::info!("Starting the application...");
let db_pool = match get_db_pool().await {
Ok(pool) => {
tracing::info!("Database pool initialized successfully.");
pool
}
Err(err) => {
eprintln!("Failed to initialize database pool: {}", err);
std::process::exit(1);
}
};
// Safe initialization of Firebase services
info!("Fetching FCM manager...");
let fcm_manager = get_fcm_manager().await;
tracing::info!("FCM manager fetched successfully.");
info!("Fetching Firestore service...");
let fbdb_service = match get_fbdb_service().await {
Ok(service) => {
tracing::info!("Firestore service initialized successfully.");
service
}
Err(e) => {
tracing::error!("Failed to initialize Firestore service: {:?}", e);
std::process::exit(1);
}
};
let passport_number = "EB0736278";
let created_at = Utc::now().timestamp();
let lnotification = LNotification {
title: "Please Verified!".to_string(),
body: "You have 5 minutes to complete verification!".to_string(),
};
let fdata = FData {
passport_number: passport_number.to_string(),
full_name: "".to_string(),
target_site: "".to_string(),
proxy_url: "".to_string(),
request_ref_number: "".to_string(),
client_application_id: "".to_string(),
created_at: created_at,
};
let user_devices = match fbdb_service.get_device_user_by_passport(&passport_number).await {
Ok(devices) => devices,
Err(e) => {
error!("Failed to retrieve user devices for passport number {}: {:?}", passport_number, e);
Vec::new() // Return empty vector on error
}
};
info!("Retrieved {} user devices for passport number {}", user_devices.len(), passport_number);
for user_device in user_devices {
let device_token = user_device.device_id.unwrap_or_default();
info!("Sending FCM notification to device: {}", device_token);
let message = FMessage {
device_token: device_token.clone(),
notification: lnotification.clone(),
data: fdata.clone(),
};
let response = match fcm_manager.send_fcm_notification(&message).await {
Ok(res) => res,
Err(e) => {
error!("Failed to send FCM notification to device {}: {:?}", device_token, e);
continue; // Proceed to the next user device if sending fails
}
};
info!("FCM Response for device {}: {:?}", device_token, response);
}
tracing::info!("Initializing Tera...");
let tera = match Tera::new("templates/**/*") {
Ok(t) => {
tracing::info!("Tera template engine initialized successfully.");
t
}
Err(e) => {
error!("Template parsing error: {}", e);
std::process::exit(1);
}
};
tracing::info!("Initializing AppState...");
let local_client = RquestClient::new();
let state = AppState {
tera,
db_pool: db_pool.clone(),
local_client,
};
tracing::info!("Starting HTTP server on {}", bind_address);
// Create an instance of your TaskManager
let task_manager = web::Data::new(Arc::new(Mutex::new(TaskManager::new())));
// Create middleware for IP filtering
let ip_filter = IpFilter::new(Arc::new(db_pool.clone()));
HttpServer::new(move || {
App::new()
.wrap(ip_filter.clone())
.app_data(web::Data::new(state.clone()))
.app_data(task_manager.clone())
.service(Files::new("/static", "./static").show_files_listing())
.route("/missions", web::get().to(show_missions))
.route("/start_mission", web::post().to(start_mission))
.route("/stop_mission", web::post().to(stop_mission))
.route("/mission_status", web::get().to(mission_status))
.service(list_logs) // Route to list log files
.service(view_logs) // Route to view logs with pagination
// .route("/handle_request_task", web::post().to(handle_request_task))
})
.bind(&bind_address)?
.run()
.await
}
fn init_environment() -> Result<(), Box<dyn std::error::Error>> {
// Load environment variables
dotenv().ok();
// Set up panic handler
panic::set_hook(Box::new(|panic_info| {
error!("Application panicked: {:?}", panic_info);
if let Some(location) = panic_info.location() {
error!(
"Panic occurred in file '{}' at line {}",
location.file(),
location.line()
);
}
if let Some(s) = panic_info.payload().downcast_ref::<&str>() {
error!("Panic message: {}", s);
}
}));
// Log environment variables (excluding sensitive data)
for (key, value) in env::vars() {
if !key.contains("SECRET") && !key.contains("KEY") {
info!("{}: {}", key, value);
}
}
Ok(())
}
Docker File https://gist.github.com/addame2/83ca522d97c9c91ab55471ccdbbd73be
use firestore::{errors::FirestoreError, FirestoreDb, FirestoreDbOptions};
use tokio::sync::OnceCell;
use std::sync::{Arc, Once};
use std::env;
use tracing::{error, info, debug};
use crate::models::{DeviceUser, PhotoVerificationStatus};
/// Singleton Firestore database service wrapper
#[derive(Clone, Debug)]
pub struct FirebaseDBService {
client: FirestoreDb,
}
/// Initializes the crypto provider once
pub fn initialize_crypto_for_fbdb() {
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to initialize crypto provider");
}
/// Retrieves environment variable with error handling
fn get_env_var(name: &str) -> Result<String, String> {
env::var(name).map_err(|e| format!("Missing or invalid {}: {}", name, e))
}
pub async fn get_fbdb() -> Result<FirebaseDBService, FirestoreError> {
let project_id = std::env::var("PROJECT_ID").map_err(|e| {
error!("PROJECT_ID environment variable not found: {}", e);
FirestoreError::DatabaseError(firestore::errors::FirestoreDatabaseError {
public: firestore::errors::FirestoreErrorPublicGenericDetails {
code: "CONFIGURATION_ERROR".to_string(),
},
details: "PROJECT_ID environment variable not found".to_string(),
retry_possible: false,
})
})?;
info!("Initializing Firestore with project ID: {}", project_id);
let db = FirestoreDb::with_options(FirestoreDbOptions::new(project_id))
.await
.map_err(|e| {
error!("Failed to initialize Firestore client: {:?}", e);
e
})?;
Ok(FirebaseDBService { client: db })
}
pub async fn get_fbdb_service() -> Result<FirebaseDBService, FirestoreError> {
get_fbdb().await
}
impl FirebaseDBService {
/// Retrieves all device users
pub async fn get_devices(&self) -> Result<Vec<DeviceUser>, FirestoreError> {
self.client
.fluent()
.select()
.from("user_devices")
.obj()
.query()
.await
}
/// Inserts photo verification status
pub async fn insert_photo_verification(
&self,
ps: &PhotoVerificationStatus,
) -> Result<(), FirestoreError> {
let _: () = self.client
.fluent()
.insert()
.into("photo_verification_status")
.document_id(&ps.request_ref_number)
.object(ps)
.execute()
.await?;
Ok(())
}
/// Retrieves photo verification status by reference number
pub async fn get_photo_verification_status(
&self,
request_ref_number: &str,
) -> Result<PhotoVerificationStatus, FirestoreError> {
self.client
.fluent()
.select()
.by_id_in("photo_verification_status")
.obj()
.one(request_ref_number)
.await?
.ok_or_else(|| FirestoreError::DatabaseError(firestore::errors::FirestoreDatabaseError {
public: firestore::errors::FirestoreErrorPublicGenericDetails {
code: "NOT_FOUND".to_string(),
},
details: format!("No verification status found for reference: {}", request_ref_number),
retry_possible: false,
}))
}
/// Retrieves device users by passport ID
pub async fn get_device_user_by_passport(
&self,
passport: &str,
) -> Result<Vec<DeviceUser>, FirestoreError> {
self.client
.fluent()
.select()
.from("user_devices")
.filter(|q| {
q.for_all([
q.field("passportId").eq(passport),
q.field("deviceId").is_not_null(),
])
})
.obj()
.query()
.await
}
}
Hey,
Seems you're getting SIGSERV which if this anyhow connected to this crate coming from underlying libraries (most probably related to TLS/SSL), which gives the idea first to verify your Docker setup so you copied libc/tls related libs as expected. Also the crate doesn't use anything unsafe in the code so it is unlikely the source of SIGSERVs itself.
I see you have some kind of complex setup with cross compiling, perhaps the culpit is there.
From my side I can say only that I use the crate using Google Distroless (debian based) docker setup on both GKE and Cloud Run and it works without surprises like that.
As an experiment, you can try to use different TLS providers:
https://github.com/abdolence/firestore-rs?tab=readme-ov-file#tls-related-features