What is the maximum number of connections for a SQLite3 database?
Why can\'t I use it for very big websites, for example with 3 million users?
Under different system, this value may be different, the python test code:
import sqlite3
import sys
# connect to multiple databases
def multi_connect(conn_num):
dbs = []
for i in range(0, conn_num):
try:
con = sqlite3.connect(str(i) + '.db')
except Exception as e:
print('connect to %d.db failed' % i)
sys.exit(-1)
# multiple connections to single database
def multi_connect2(conn_num):
db_name = 'x.db'
conns = []
for i in range(0, conn_num):
try:
conn = sqlite3.connect(db_name)
except Exception as e:
print('connect failed at %d' % i)
sys.exit(-1)
Under ubuntu, the failed count is 1021, you can test it under different OS.