Limit the number of opened connections#

By default, each worker using an AiopgConnector will open up to 10 parallel connections. You can control this value with the max_size parameter (from psycopg_pool.ConnectionPool())(see Mind the size of your PostgreSQL pool)

Disabling the LISTEN/NOTIFY feature (see How does this all work ?) will use one less connection per worker:

app = procrastinate.App(worker_defaults={"listen_notify": False})
# or when launching a worker:
app.run_worker(listen_notify=False)

This works from the command line too:

procrastinate worker --no-listen-notify