pythonの自前コード内で、postgresへの connection poolを行い、更に、 concurrent.futures.ProcessPoolExecutor for python の並列処理による影響でしょうか
psycopg2.DatabaseError: error with status PGRES_TUPLES_OK and no message from the libpq
のようなエラーが発生。
なので、以下のように connectionを使いまわす部分をcomment化したところ、 解消したみたい。
def db_connect(self): # global db_conn # if db_conn: # return db_conn db_conn = psycopg2.connect( database = conf["db"]["db_name"], user = conf["db"]["db_user"], password = conf["db"]["db_pass"], host = conf["db"]["db_host"], port = conf["db"]["db_port"] ) return db_conn