| <class '_mysql_exceptions.OperationalError'> | Python 2.6.5: /usr/bin/python2.6 Sat Sep 4 02:44:04 2010 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /var/www/cgi-bin/last.py in |
| 257 else: |
| 258 # if random()>0.3: |
| 259 image = test.serve() |
| 260 # else: |
| 261 # image='sc_small.png' |
| image undefined, test = <__main__.handler instance>, test.serve = <bound method handler.serve of <__main__.handler instance>> |
| /var/www/cgi-bin/last.py in serve(self=<__main__.handler instance>) |
| 119 a=time() |
| 120 def serve(self): |
| 121 from api import * |
| 122 import pickle |
| 123 import memcache |
| api undefined |
| /var/www/cgi-bin/api.py in |
| 43 self.conn.close() |
| 44 conner = connector() |
| 45 conner.connect() |
| 46 cl = memcache.Client(['127.0.0.1:11211'], debug=0) |
| 47 def log(file,type): |
| conner = None, conner.connect undefined |
| /var/www/cgi-bin/api.py in connect(self=<api.connector instance>) |
| 35 return out |
| 36 def connect(self): |
| 37 self.conn = pymysql.connect(host=HOST, port=3306, user=USER, passwd=PASS, db=DB,charset="utf8") |
| 38 # self.conn.charset="utf8" |
| 39 # self.cur = self.conn.cursor() |
| self = <api.connector instance>, self.conn undefined, global pymysql = None, pymysql.connect undefined, host undefined, global HOST = None, port undefined, user undefined, global USER = None, passwd undefined, global PASS = None, db undefined, global DB = None, charset undefined |
| /usr/lib/python2.6/site-packages/MySQLdb/__init__.py in Connect(*args=(), **kwargs={'charset': 'utf8', 'db': 'scaicha', 'host': 'localhost', 'passwd': 'de4r5tf', 'port': 3306, 'user': 'root'}) |
| 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': 'scaicha', 'host': 'localhost', 'passwd': 'de4r5tf', 'port': 3306, 'user': 'root'} |
| /usr/lib/python2.6/site-packages/MySQLdb/connections.py in __init__(self=<_mysql.connection closed at 8198824>, *args=(), **kwargs={'charset': 'utf8', 'db': 'scaicha', 'host': 'localhost', 'passwd': 'de4r5tf', 'port': 3306, 'user': 'root'}) |
| 186 kwargs2['client_flag'] = client_flag |
| 187 |
| 188 super(Connection, self).__init__(*args, **kwargs2) |
| 189 |
| 190 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 8198824>, ).__init__ = <bound method Connection.__init__ of <_mysql.connection closed at 8198824>>, 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': 'scaicha', 'host': 'localhost', 'passwd': 'de4r5tf', 'port': 3306, 'user': 'root'} |
<class '_mysql_exceptions.OperationalError'>: (1040, 'Too many connections')
args =
(1040, 'Too many connections')
message =
''