| <class '_mysql_exceptions.OperationalError'> | Python 2.6.6: Mon Feb 6 16:35:01 2012 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /usr/lib/pymodules/python2.6/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>) |
| 556 """Runs the handler, flushes the streams, and ends the request.""" |
| 557 try: |
| 558 protocolStatus, appStatus = self.server.handler(self) |
| 559 except: |
| 560 traceback.print_exc(file=self.stderr) |
| protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>> |
| /usr/lib/pymodules/python2.6/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>) |
| 1116 try: |
| 1117 try: |
| 1118 result = self.application(environ, start_response) |
| 1119 try: |
| 1120 for data in result: |
| result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <function app>, environ = {'DOCUMENT_ROOT': '/var/www/lyrics/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lyrics.mirkforce.net', 'HTTP_IF_MODIFIED_SINCE': 'Mon, 09 Aug 2010 10:23:55 GMT', ...}, start_response = <function start_response> |
| /var/www/lyrics/cgi-bin/lepserver.fcgi in app(env={'DOCUMENT_ROOT': '/var/www/lyrics/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lyrics.mirkforce.net', 'HTTP_IF_MODIFIED_SINCE': 'Mon, 09 Aug 2010 10:23:55 GMT', ...}, start_response=<function start_response>) |
| 70 start_response('200 OK', [('Content-Type', 'text/xml')]) |
| 71 |
| 72 db = inc.dbl(addr) #oh my... |
| 73 context['db'] = db |
| 74 |
| db undefined, global inc = <module 'inc' from '/var/www/lyrics/cgi-bin/inc.py'>, inc.dbl = <class inc.dbl>, addr = '38.107.179.212' |
| /var/www/lyrics/cgi-bin/inc.py in __init__(self=<inc.dbl instance>, addr='38.107.179.212') |
| 35 def __init__(self, addr): |
| 36 self.addr = addr |
| 37 self.connect() |
| 38 |
| 39 def sql(self, s, params = ''): |
| self = <inc.dbl instance>, self.connect = <bound method dbl.connect of <inc.dbl instance>> |
| /var/www/lyrics/cgi-bin/inc.py in connect(self=<inc.dbl instance>) |
| 21 def connect(self): |
| 22 #log('pre connect...') |
| 23 self.db = MySQLdb.connect(host="localhost", user="lyrics", passwd="lalala", db="lyrics", charset='utf8') |
| 24 #log('post connect...') |
| 25 |
| self = <inc.dbl instance>, self.db = None, global MySQLdb = <module 'MySQLdb' from '/usr/lib/pymodules/python2.6/MySQLdb/__init__.pyc'>, MySQLdb.connect = <function Connect>, host undefined, user undefined, passwd undefined, db undefined, charset undefined |
| /usr/lib/pymodules/python2.6/MySQLdb/__init__.py in Connect(*args=(), **kwargs={'charset': 'utf8', 'db': 'lyrics', 'host': 'localhost', 'passwd': 'lalala', 'user': 'lyrics'}) |
| 79 """Factory function for connections.Connection.""" |
| 80 from connections import Connection |
| 81 return Connection(*args, **kwargs) |
| 82 |
| 83 connect = Connection = Connect |
| Connection = <class 'MySQLdb.connections.Connection'>, args = (), kwargs = {'charset': 'utf8', 'db': 'lyrics', 'host': 'localhost', 'passwd': 'lalala', 'user': 'lyrics'} |
| /usr/lib/pymodules/python2.6/MySQLdb/connections.py in __init__(self=<_mysql.connection closed at 8b1bf0c>, *args=(), **kwargs={'charset': 'utf8', 'db': 'lyrics', 'host': 'localhost', 'passwd': 'lalala', 'user': 'lyrics'}) |
| 168 kwargs2['client_flag'] = client_flag |
| 169 |
| 170 super(Connection, self).__init__(*args, **kwargs2) |
| 171 |
| 172 self.encoders = dict([ (k, v) for k, v in conv.items() |
| builtin super = <type 'super'>, global Connection = <class 'MySQLdb.connections.Connection'>, self = <_mysql.connection closed at 8b1bf0c>, ).__init__ = <bound method Connection.__init__ of <_mysql.connection closed at 8b1bf0c>>, args = (), kwargs2 = {'client_flag': 196608, 'conv': {0: <class 'decimal.Decimal'>, 1: <type 'int'>, 2: <type 'int'>, 3: <type 'long'>, 4: <type 'float'>, 5: <type 'float'>, 7: <function mysql_timestamp_converter>, 8: <type 'long'>, 9: <type 'int'>, 10: <function Date_or_None>, ...}, 'db': 'lyrics', 'host': 'localhost', 'passwd': 'lalala', 'user': 'lyrics'} |
<class '_mysql_exceptions.OperationalError'>: (1040, 'Too many connections')
args =
(1040, 'Too many connections')
message =
''