I have a database on a 10cpu 56GB ram machine. And there are 2-4 clients that runs a simulation and writes data into this db. first client is a MacBook Pro on Wifi, the first machine that I start my simulation code and runs no problem. The other machines are Mac mini, and an intel and AMD pc’s co0nnected via Gigabit lan connection. When I start simulation on Mac mini, it has error when tries to run to db. I can not find any reason for this. Each client has its own db user, all users have needed grants. They all work on dbeaver.
Postgres memory configuration is like this:
max_connections = 1000
shared_buffers =14GB # min 128kB
# (change requires restart)
#huge_pages = try # on, off, or try
# (change requires restart)
#huge_page_size = 0 # zero for system default
# (change requires restart)
temp_buffers = 1GB # min 800kB
#max_prepared_transactions = 0 # zero disables the feature
# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
work_mem = 1GB # min 64kB
#hash_mem_multiplier = 1.0 # 1-1000.0 multiplier on hash table work_mem
maintenance_work_mem = 3GB # min 1MB
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
#logical_decoding_work_mem = 64MB # min 64kB
dynamic_shared_memory_type = posix # the default is the first option
max_worker_processes = 8 # (change requires restart)
max_parallel_workers_per_gather = 4 # taken from max_parallel_workers
max_parallel_maintenance_workers = 4 # taken from max_parallel_workers
max_parallel_workers = 8 # maximum number of max_worker_processes that
wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
# (change requires restart)
#wal_writer_delay = 200ms # 1-10000 milliseconds
#wal_writer_flush_after = 1MB # measured in pages, 0 disables
#wal_skip_threshold = 2MB
#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000
# - Checkpoints -
#checkpoint_timeout = 5min # range 30s-1d
checkpoint_completion_target = 0.7 # checkpoint target duration, 0.0 - 1.0
#checkpoint_flush_after = 256kB # measured in pages, 0 disables
#checkpoint_warning = 30s # 0 disables
max_wal_size = 8GB
min_wal_size = 80MB
Error on Python code
Traceback (most recent call last):
File “/Users/ha/PycharmProjects/BBX_SIM_V2/main.py”, line 61, in run_simulation
write_df_to_db(df, ‘pos_details’, ‘SIMDB’, ‘bbot_sim_prd01’, ‘POSTGRES’, col_list = None)
File “/Users/ha/PycharmProjects/BBX_SIM_V2/bbx_utils/db_utils.py”, line 532, in write_df_to_db
engine.dispose()
UnboundLocalError: local variable ‘engine’ referenced before assignment
connection to server at “192.168.149.201”, port 5432 failed: Network is down
Is the server running on that host and accepting TCP/IP connections?
Error on Postgres
`2024-06-18 15:58:57.516 UTC [1778978] bbot_rt_1@SIMDB FATAL: canceling authentication due to timeout
2024-06-18 16:52:58.506 UTC [1823873] bbot_rt_1@SIMDB FATAL: canceling authentication due to timeout
2024-06-18 18:40:19.898 UTC [1852956] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1666556] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852896] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852912] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852908] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852909] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852911] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852916] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852913] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852907] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852910] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 19:41:11.483 UTC [1852914] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection timed out
2024-06-18 20:40:32.065 UTC [1959699] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection reset by peer
2024-06-18 20:40:32.067 UTC [1959658] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection reset by peer
2024-06-18 20:40:32.070 UTC [1959690] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection reset by peer
2024-06-18 20:40:32.070 UTC [1959708] bbot_rt_1@SIMDB LOG: could not receive data from client: Connection reset by peer`
No problem on connection
HakanA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.