473,385 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Pylons, SQLAlchemy, too many connections problem.

Hello.

I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug
that
doesn't exist earlier.

My connection code:
<code>
import sqlalchemy.mods.threadlocal
from sqlalchemy import DynamicMetaData, objectstore

metadata = DynamicMetaData( case_sensitive = False )

def db_connect( dsn ):
engine = create_engine( dsn, echo=False, echo_pool=False,
encoding='latin2', convert_unicode=True )
metadata.connect( engine )
</code>

command "netstat -an|grep 5432|grep ESTABLISHED|wc -l" displays one
more connection after each refresh of page until I have exceptions
such as:

sqlalchemy.exceptions.DBAPIError: (Connection failed)
(OperationalError) FATAL: sorry, too many clients already

What is wrong?

Aug 31 '07 #1
2 4007
Adam Kubica a écrit :
Hello.

I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug
that
doesn't exist earlier.

My connection code:
<code>
import sqlalchemy.mods.threadlocal
from sqlalchemy import DynamicMetaData, objectstore

metadata = DynamicMetaData( case_sensitive = False )

def db_connect( dsn ):
engine = create_engine( dsn, echo=False, echo_pool=False,
encoding='latin2', convert_unicode=True )
metadata.connect( engine )
</code>

command "netstat -an|grep 5432|grep ESTABLISHED|wc -l" displays one
more connection after each refresh of page until I have exceptions
such as:

sqlalchemy.exceptions.DBAPIError: (Connection failed)
(OperationalError) FATAL: sorry, too many clients already

What is wrong?
I don't know for sure, but I guess you'd get better answers posting
either on the Pylons or SQLAlchemy's google groups.
Aug 31 '07 #2
On Fri, 31 Aug 2007 14:03:48 +0200, Adam Kubica wrote:
Hello.

I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug
that
doesn't exist earlier.

My connection code:
<code>
import sqlalchemy.mods.threadlocal
from sqlalchemy import DynamicMetaData, objectstore

metadata = DynamicMetaData( case_sensitive = False )

def db_connect( dsn ):
engine = create_engine( dsn, echo=False, echo_pool=False,
encoding='latin2', convert_unicode=True )
metadata.connect( engine )
</code>

command "netstat -an|grep 5432|grep ESTABLISHED|wc -l" displays one
more connection after each refresh of page until I have exceptions
such as:

sqlalchemy.exceptions.DBAPIError: (Connection failed)
(OperationalError) FATAL: sorry, too many clients already

What is wrong?
Don't use DynamicMetaData(), use MetaData(), it's the problem.
Aug 31 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: John Salerno | last post by:
Are there any major differences between these two? It seems they can both be used with TurboGears, and SQLAlchemy with Django. I'm just wondering what everyone's preference is, and why, and if...
0
by: Karlo Lozovina | last post by:
I've just upgraded to Python 2.5, SQLAlchemy 0.3.3, and py2exe 0.6.5 (the py2.5 version, yes). Simple: --- import sqlalchemy print 'Test' ---
6
by: Ilias Lazaridis | last post by:
- Ï/Ç metaperl: Ilias Lazaridis: Michael Bayer wrote within: http://groups.google.com/group/sqlalchemy/msg/9d7a096a61abfc6f I understand your elaborations.
3
by: Greg Copeland | last post by:
I'm using SQLAlchemy and have a need to call an Oracle function; which is not the same as a stored procedure. Can this be done directory or indirectly with SQLAlchemy? If so, can someone please...
0
by: Nathan Harmston | last post by:
HI, I posted this to sqlalchemy but didnt get a response, so I was wondering if anyone on python-list could help me. I m currently trying to build an api for a database and I really like the...
4
by: Mage | last post by:
Hello, I don't want to be impolite, just in short: I am thinking about leaving RoR and coming back to Python. I've missed the last two years in Python, however I have been subscribed to this...
1
by: John Salerno | last post by:
Hi everyone. I was thinking about signing up with a web host that supports Pylons (among many other things) and one of the differences between the various plans is application memory for...
5
by: John Salerno | last post by:
I just installed Pylons onto my hosting server so I could try out templating with Mako, but it seems a little more complicated than that. From the look of it all, the site seems to want a full...
1
by: Aspersieman | last post by:
On Wed, 05 Nov 2008 08:35:23 +0200, 3000 billg <billg3000@hos.twgg.org> wrote: Hi Excellent choice :)
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.