Subject | Re: [firebird-support] Re: Time out network after 436 connections on data base employee |
---|---|
Author | Philippe Makowski |
Post date | 2010-10-19T17:33:09Z |
2010/10/19 Danguelle Mickael <mickael.danguelle@...>
without a real test case explaining exactly what your are doing, and
the availables ressources of the box, what don't you want us to to
tell you ?
giving small pieces like that or only
but I insist, to deal with more than some hundred of connections, what
ever the os and the Firebird version, it is better to have a
connection pooling system IMHO
but may be other Firebird users here can share their experience with you
for your information on my MacOsX box the following simple bad written
code have no problem to run and create 1000 connections :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import kinterbasdb
kinterbasdb.init(type_conv=300)
from kinterbasdb import services
svcCon = services.connect(host='192.168.1.6',user='sysdba',
password='masterkey')
l = []
for i in range(1000):
con = kinterbasdb.connect(dsn='192.168.1.6:employee',
user='sysdba', password='masterkey')
l.append(con)
cur = con.cursor()
cur.execute("select FIRST 1 * from COUNTRY")
cur.fetchall()
print 'Nb connexions :', svcCon.getConnectionCount()
con.commit()
....
Nb connexions : 1000
if I run it on my small Atom laptop (Fedora 13 without changes) it
fails at 508 connections, because of too many open files
not really a surprise !
> my sysctl.conf for tcp_max_syn_backlog and somaxconnyes and ?
>
> net.core.somaxconn = 262144
> net.ipv4.tcp_max_syn_backlog = 262144
without a real test case explaining exactly what your are doing, and
the availables ressources of the box, what don't you want us to to
tell you ?
giving small pieces like that or only
> I have a time out network, after 436 connections on data base employee in the directory firebirdis not enough information to help you
but I insist, to deal with more than some hundred of connections, what
ever the os and the Firebird version, it is better to have a
connection pooling system IMHO
but may be other Firebird users here can share their experience with you
for your information on my MacOsX box the following simple bad written
code have no problem to run and create 1000 connections :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import kinterbasdb
kinterbasdb.init(type_conv=300)
from kinterbasdb import services
svcCon = services.connect(host='192.168.1.6',user='sysdba',
password='masterkey')
l = []
for i in range(1000):
con = kinterbasdb.connect(dsn='192.168.1.6:employee',
user='sysdba', password='masterkey')
l.append(con)
cur = con.cursor()
cur.execute("select FIRST 1 * from COUNTRY")
cur.fetchall()
print 'Nb connexions :', svcCon.getConnectionCount()
con.commit()
....
Nb connexions : 1000
if I run it on my small Atom laptop (Fedora 13 without changes) it
fails at 508 connections, because of too many open files
not really a surprise !