MySQL : Too many connections
jbauer at rubic.com
Thu Mar 13 16:37:30 CET 2003
You haven't indicated what type of application you're
running with MySQL. For web applications, I create a
single database connection object per user session,
running as a persistent connection (a.k.a long running
process). All database queries are passed through the
database connection object.
In other words, you should only require one database
connection per process space (or modulo # of databases,
if accessing multiple databases).
> I get an exception using MySQL, "Too many connections". I understand
> the error and why it occurrs, but how can I avoid it?? Do I close
> after each cursor.execute-call or do I close the connection?? In
> case of closing after the execute-call, how ??
> What is the proper way of inserting a lot of records and during
> this process check rows allready inserted and avoid the problem
More information about the Python-list