| <class '_mysql_exceptions.OperationalError'> | Python 2.5.1: /usr/local/bin/python2.5 Tue Oct 7 02:26:13 2008 |
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/local/cgi/20un/products/ShowProduct.py in |
| 154 self.__ncg.display(r'%sShowProduct.html'%self.htmlDocsPath) |
| 155 |
| 156 |
| 157 pageObj = ShowProduct() |
| 158 pageObj.show() |
| pageObj = <__main__.ShowProduct instance at 0x81c99ac>, pageObj.show = <bound method ShowProduct.show of <__main__.ShowProduct instance at 0x81c99ac>> |
| /usr/local/cgi/20un/products/ShowProduct.py in show(self=<__main__.ShowProduct instance at 0x81c99ac>) |
| 150 if prObj is not None: |
| 151 self.setCompanyInfo(prObj.mainID) |
| 152 self.setCompanyHotProducts(productID,prObj.mainID) |
| 153 self.setRecentTradeLeads(prObj.mainID) |
| 154 self.__ncg.display(r'%sShowProduct.html'%self.htmlDocsPath) |
| self = <__main__.ShowProduct instance at 0x81c99ac>, self.setCompanyHotProducts = <bound method ShowProduct.setCompanyHotProducts of <__main__.ShowProduct instance at 0x81c99ac>>, productID = 10420, prObj = <ProductManager.Product instance at 0x823bc4c>, prObj.mainID = 153148 |
| /usr/local/cgi/20un/products/ShowProduct.py in setCompanyHotProducts(self=<__main__.ShowProduct instance at 0x81c99ac>, productID=10420, mainID=153148) |
| 41 if mainID > 100000: |
| 42 count = 0 |
| 43 hotProducts = proObj.listFreeProductHotProducts(productID) |
| 44 if hotProducts : |
| 45 for hotProduct in hotProducts: |
| hotProducts undefined, proObj = <ProductManager.Product instance at 0x832ca8c>, proObj.listFreeProductHotProducts = <bound method Product.listFreeProductHotProducts of <ProductManager.Product instance at 0x832ca8c>>, productID = 10420 |
| /usr/local/core/ProductManager.py in listFreeProductHotProducts(self=<ProductManager.Product instance at 0x832ca8c>, productID=10420, count=4) |
| 196 categoryIDs = self.getProductCategories() |
| 197 if categoryIDs: |
| 198 return self.getHotProductsByCategoryIDs(categoryIDs,count) |
| 199 |
| 200 def listFreeUserHotProducts(self,mainID=0,count=int(ncg.hdf.getIntValue('hotProductListingLimit',4))): |
| self = <ProductManager.Product instance at 0x832ca8c>, self.getHotProductsByCategoryIDs = <bound method Product.getHotProductsByCategoryIDs of <ProductManager.Product instance at 0x832ca8c>>, categoryIDs = [59], count = 4 |
| /usr/local/core/ProductManager.py in getHotProductsByCategoryIDs(self=<ProductManager.Product instance at 0x832ca8c>, categoryIDs=[59], count=4) |
| 163 if categoryIDs and type(categoryIDs)==type([]) and count: |
| 164 from CategoryManager import Category |
| 165 catObj = Category() |
| 166 def getAllChilds(catID,lst): |
| 167 childIDs = catObj.getChilds(catID) |
| catObj undefined, Category = <class CategoryManager.Category at 0x83129bc> |
| /usr/local/core/CategoryManager.py in __init__(self=<CategoryManager.Category instance at 0x832cd6c>) |
| 11 def __init__(self): |
| 12 import DataAccessLayer |
| 13 self.__dataObj = DataAccessLayer.DataLayer() |
| 14 |
| 15 def getCategory(self,catID): |
| self = <CategoryManager.Category instance at 0x832cd6c>, self.__dataObj undefined, DataAccessLayer = <module 'DataAccessLayer' from '/usr/local/core/DataAccessLayer.pyc'>, DataAccessLayer.DataLayer = <class DataAccessLayer.DataLayer at 0x823c2cc> |
| /usr/local/core/DataAccessLayer.py in __init__(self=<DataAccessLayer.DataLayer instance at 0x832c80c>) |
| 49 |
| 50 class DataLayer: |
| 51 def __init__(self): self.__sqlObj = SQLDataAccess() |
| 52 |
| 53 |
| __init__ undefined, self = <DataAccessLayer.DataLayer instance at 0x832c80c>, self.__sqlObj undefined, global SQLDataAccess = <class DataAccessLayer.SQLDataAccess at 0x823c29c> |
| /usr/local/core/DataAccessLayer.py in __init__(self=<DataAccessLayer.SQLDataAccess instance at 0x832cd8c>) |
| 12 self.__connection = MySQLdb.connect(host=ncg.hdf.getValue('dbHost','localhost'),user=ncg.hdf.getValue('dbUser',''), |
| 13 passwd=ncg.hdf.getValue('dbPass',''),db=ncg.hdf.getValue('dbDB',''), |
| 14 client_flag =65536|131072) # client_flags: CLIENT_MULTI_STATEMENTS 65536 , CLIENT_MULTI_RESULTS 131072 |
| 15 except: raise |
| 16 |
| client_flag undefined |
| /usr/local/lib/python2.5/site-packages/MySQLdb/__init__.py in Connect(*args=(), **kwargs={'client_flag': 196608, 'db': 'main', 'host': 'localhost', 'passwd': 'xQlm#i75m', 'user': 'kbnt3KG#p'}) |
| 72 """Factory function for connections.Connection.""" |
| 73 from connections import Connection |
| 74 return Connection(*args, **kwargs) |
| 75 |
| 76 connect = Connection = Connect |
| Connection = <class 'MySQLdb.connections.Connection'>, args = (), kwargs = {'client_flag': 196608, 'db': 'main', 'host': 'localhost', 'passwd': 'xQlm#i75m', 'user': 'kbnt3KG#p'} |
| /usr/local/lib/python2.5/site-packages/MySQLdb/connections.py in __init__(self=<_mysql.connection closed at 838540c>, *args=(), **kwargs={'client_flag': 196608, 'db': 'main', 'host': 'localhost', 'passwd': 'xQlm#i75m', 'user': 'kbnt3KG#p'}) |
| 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 838540c>, ).__init__ = <bound method Connection.__init__ of <_mysql.connection closed at 838540c>>, 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 at 0x8242224>, 8: <type 'long'>, 9: <type 'int'>, 10: <function Date_or_None at 0x824217c>, ...}, 'db': 'main', 'host': 'localhost', 'passwd': 'xQlm#i75m', 'user': 'kbnt3KG#p'} |
<class '_mysql_exceptions.OperationalError'>: (1040, 'Too many connections')