Skip to content

Commit

Permalink
Set idle timeout to 900
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-vdberg committed Dec 13, 2024
1 parent 463061d commit 526afb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Binary file modified src/.pg_client.py.swp
Binary file not shown.
5 changes: 2 additions & 3 deletions src/pg_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ def get_solver_rewards(

# Here, we use the convention that we run the prod query for the first connection
# and the barn query to all other connections
log.info("Checking statement timeout")
_res = self.connections[0].execute(text("SHOW statement_timeout;")).scalar()
log.info(f"Statement timeout for database is: {_res}")
log.info("Setting tcp_keepalives_idle to 900 for prod connection")
self.connections[0].execute(text("SET tcp_keepalives_idle = 900;"))
log.info("Running prod query for first connection (in get_solver_rewards)")
try:
results.append(
Expand Down

0 comments on commit 526afb6

Please sign in to comment.