You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per each connection superclassic needs 2 handles - one for a socket, next for a database file.
SC stops to open files exactly after reaching 1024 limit. This limit is a glibc standard limit.
This lead to the fact that you can't have more that 508 simultaneous connctions to the same database using SuperClassic under Linux.
Windows is not affected, neither Classic or SuperServer, they can each 1000 simultaneous connections if there are enough ressources on the box.
Possible solution :
- patch glibc raising #define __FD_SETSIZE 1024 to build Firebird (not the best solution)
- use pool() instead of select()
- not re-opening database file each time database is opened, but using instead existing descriptor
here a little Python script to raise the problem :
l = []
for i in range(1000):
con = kinterbasdb.connect(dsn='localhost:employee', user='sysdba',
password='masterkey')
l.append(con)
cur = con.cursor()
cur.execute("select FIRST 1 * from COUNTRY")
print i
print cur.fetchall()
print 'Nb connexions :', svcCon.getConnectionCount()
con.commit()
Submitted by: @pmakowski
Per each connection superclassic needs 2 handles - one for a socket, next for a database file.
SC stops to open files exactly after reaching 1024 limit. This limit is a glibc standard limit.
This lead to the fact that you can't have more that 508 simultaneous connctions to the same database using SuperClassic under Linux.
Windows is not affected, neither Classic or SuperServer, they can each 1000 simultaneous connections if there are enough ressources on the box.
Possible solution :
- patch glibc raising #define __FD_SETSIZE 1024 to build Firebird (not the best solution)
- use pool() instead of select()
- not re-opening database file each time database is opened, but using instead existing descriptor
here a little Python script to raise the problem :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import kinterbasdb
kinterbasdb.init(type_conv=300)
from kinterbasdb import services
svcCon = services.connect(host='localhost',user='sysdba', password='masterkey')
l = []
for i in range(1000):
con = kinterbasdb.connect(dsn='localhost:employee', user='sysdba',
password='masterkey')
l.append(con)
cur = con.cursor()
cur.execute("select FIRST 1 * from COUNTRY")
print i
print cur.fetchall()
print 'Nb connexions :', svcCon.getConnectionCount()
con.commit()
Commits: d1df535 20b1568 8af6268
The text was updated successfully, but these errors were encountered: