bowen
05/25/2023, 9:09 PMDatabaseError: could not open read-only [file=/opt/homebrew/var/questdb/db/BinanceUM-TRXUSDT-kline-1m/2023-03-20.1/unit.d]
LINE 1: SELECT * FROM 'BinanceUM-TRXUSDT-kline-1m'
Does anyone know why?import psycopg2 as pg
# 创建连接池
with pg.connect(
host='127.0.0.1',
port=8812,
user='admin',
password='quest',
database='questdb'
) as conn:
for symbol in tqdm(symbols_usdt):
table_name = f"BinanceUM-{symbol}-kline-1m"
QUERY = f"SELECT * FROM '{table_name}'"
cursor = conn.cursor()
cursor.execute(QUERY)
cursor.close()
Imre
05/25/2023, 10:24 PMbowen
05/25/2023, 11:17 PMImre
05/25/2023, 11:33 PMbowen
05/25/2023, 11:38 PMsysctl kern.maxfilesperproc
and get
kern.maxfilesperproc: 245760
this is much greater than the number of files the databse opened (according to the log file). The questdb only opened 1120 files, and reach the limit. I'm confused now.Imre
05/26/2023, 1:06 AM-XX:-MaxFDLimit
on the java command line to QuestDB to use the increased limit on mac.
without this the JVM uses 10240 regardless what you set.
will raise an issue and investigate further.could not open read-only
error in the database logs, you will probably see an errno=x
on the same line, where x
is the OS error code.
please, try to find this and share.
24
means Too many open files
, for example.bowen
05/26/2023, 1:46 AMerrono
is 24
!
2023-05-25T23:35:11.005398Z C i.q.c.p.PGConnectionContext error [msg=`could not open read-only [file=/opt/homebrew/var/questdb/db/BinanceUM-DOTUSDT-kline-1m/2023-02-20.0/unit.i]`, errno=24]
Imre
05/26/2023, 9:02 AM-XX:-MaxFDLimit
helps.bowen
05/27/2023, 12:52 AM