Closed fnacarellidev closed 4 months ago
For now it's working, i'm using the exact same setup, but with wal_level=logical
, probably it will stop working soon, the last time I got it working for half an hour and it suddenly stopped working.
Added this to the old setup and now it seems to work, will keep the issue open while I make some tests, but I think this might solve the problem.
+ startupProbe:
+ failureThreshold: 3
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ tcpSocket:
+ port: 65432
I'm trying to deploy and electric-sql service for the first time on the Google Cloud Platform, as decribed on https://electric-sql.com/docs/api/cli#proxy-tunnel I tried enabling the proxy tunnel since the GCP services indeed only support HTTP connections, at first I stumbled on this problem and kept receiving the following error message:
▓ ┌────────────────────────────────────┐ ▓ │ MODULE ERROR: Electric.Replication.PostgresConnector │ ▓ ┕━━━━━━━━━━━━━━━━━━━━━━━━━┙ ▓ Failed to start child Electric.Satellite.ClientReconnectionInfo: ▓ {%DBConnection.ConnectionError{message: "connection not available and request was dropped from queue after 2000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n 1. Ensuring your database is available and that you can connect to it\n 2. Tracking down slow queries and making sure they are running fast enough\n 3. Increasing the pool_size (although this increases resource consumption)\n 4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n", severity: :error, reason: :queue_timeout}, [{DBConnection, :run, 3, [file: ~c"lib/db_connection.ex", line: 960, error_info: %{module: Exception}]}, {Electric.Satellite.ClientReconnectionInfo, :init, 1, [file: ~c"lib/electric/satellite/client_reconnection_info.ex", line: 1028]}, {:gen_server, :init_it, 2, [file: ~c"gen_server.erl", line: 2057]}, {:gen_server, :init_it, 6, [file: ~c"gen_server.erl", line: 2012]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 329]}]}
After a while trying to find the solution, I remembered I had set wal_level to logical, and I was currently using
"ELECTRIC_WRITE_TO_PG_MODE"=direct_writes
so I resetted the database and kept wal_level as replica, things started working, I was no longer receiving that error but it came back, and I can't fix no matter what I try, I already resetted the service countless times, I already tried resetting the DB instance too (POSTGRES 14), I'd really try to get electric running on a production environment to test it out, hopefully I can get some help here, if there's any info you guys need please let me know.That's the Config Connector configuration i'm currently using: