Bug0066
- Description
- Mysql connection exhaustion
When leaving pyflag idle it just consumes mysql connections about once per few seconds (metarefresh time)
8874(Debug): Added pyflag.FlagFramework.EventHander 'EventLog:DLLInitDB'
8874(Debug): Added pyflag.FlagFramework.EventHander 'IEIndex:IEIndexEventHandler'
8874(Debug): Added pyflag.FlagFramework.EventHander 'RegScan:RegEventHandler'
8874(Debug): Added pyflag.FlagFramework.EventHander 'Sleuthkit:SKFSEventHandler'
8874(Debug): Added pyflag.FlagFramework.EventHander 'HTTP:HTTPTables'
8874(Debug): Added pyflag.FlagFramework.EventHander 'IRC:IRCTables'
8874(Debug): Added pyflag.FlagFramework.EventHander 'MSN:MSNTables'
8874(Debug): Added pyflag.FlagFramework.EventHander 'POP:EmailTables'
8874(Debug): Will attempt to load plugin '/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/plugins/FileFormats/RevEng.py'
8874(Debug): *** Will not load Module RevEng: Module not active
8879(Debug++): Key testing not found
8879(Debug++): Stored key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Infomation): Log thread starting in thread Thread-1, pid 8879
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 1 in total
8874(Infomation): Log thread starting in thread Thread-1, pid 8874
8874(Debug++): Key testing not found
8874(Debug++): Stored key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 1 in total
Serving PyFlag requests on ('192.168.3.37', 9010)
8879(Debug++): New Connection to DB testing. We now have 2 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 3 in total
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 2 in total
DB Error was Unable to connect - does the DB Exist?
Unable to connect - does the DB Exist?
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 3 in total
8874(Infomation): 192.168.3.210 - - [19/Dec/2007 10:09:10] "GET / HTTP/1.1" 200 -
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 4 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 4 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 5 in total
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 5 in total
8874(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb753064c>
8874(Debug++): New Connection to DB testing. We now have 6 in total
8874(Debug++): Key mysql not found
8874(Debug++): Stored key mysql: <pyflag.DB.Pool instance at 0xb74ce5cc>
8874(Debug++): Got key mysql: <pyflag.DB.Pool instance at 0xb74ce5cc>
8874(Debug++): New Connection to DB mysql. We now have 7 in total
----------------------------------------
Exception happened during processing of request from ('192.168.3.210', 56185)
Traceback (most recent call last):
File "/usr/lib/python2.4/SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.4/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.4/SocketServer.py", line 521, in __init__
self.handle()
File "/usr/lib/python2.4/BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "/usr/lib/python2.4/BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/FlagHTTPServer.py", line 248, in do_GET
if flag.check_config(result,query):
File "/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/FlagFramework.py", line 613, in check_config
report.display(query,result)
File "/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/plugins/Configuration.py", line 114, in display
dbh = DB.DBO('mysql')
File "/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/DB.py", line 308, in __init__
self.dbh,self.mysql_bin_string=DBH.get(key).get()
File "/data/Test_Pyflag_latest_20071218/Pyflag_Installed_latest_20071218/lib/python2.4/site-packages/pyflag/DB.py", line 210, in get
raise DBError("Unable to connect - does the DB Exist?")
DBError: Unable to connect - does the DB Exist?
----------------------------------------
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 6 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 7 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 8 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 9 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 10 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 11 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 12 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 13 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 14 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
8879(Debug++): New Connection to DB testing. We now have 15 in total
8879(Debug++): Got key testing: <pyflag.DB.Pool instance at 0xb7530d8c>
I'm still trying to work out the backtrace here too.
[[2007-12-19]] Updated - error was a wrong password. Generally the error handling could be improved. Error handling should not increase the count of connections.
- Logged
- 2007-12-18
- Logged By
- Assigned to
- Status
- Closed
Get back to the BugIndex
That is actually not a bug - PyFlag was trying to connect to the DB which it did not have credentials to (hence DBError: Unable to connect - does the DB Exist?) We recently changed to message to indicate what you should do (connect to the gui to set up credentials) because it was confusing some users.
The total db connection handles is not actually incrementing - thats a slight bug, it was incremented before the connection was made, so when the conneciton failed that number was not decremented again. This number is only used for debugging the total number of db resources we use so its not a big problem.
