You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This started cropping up after upgrading the desktop I use to run my import pipeline. A sample output is:
Importing lineups from 2017_games_mls.xlsx
Traceback (most recent call last):
File "C:\Python27\Scripts\trapp-script.py", line 11, in <module>
load_entry_point('trapp==0.5.0b1', 'console_scripts', 'trapp')()
File "c:\python27\lib\site-packages\trapp\command_line.py", line 310, in main
verbImport(args)
File "c:\python27\lib\site-packages\trapp\command_line.py", line 233, in verbImport
importLineups(args.infile)
File "c:\python27\lib\site-packages\trapp\command_line.py", line 164, in importLineups
importer.doImport()
File "c:\python27\lib\site-packages\trapp\importer.py", line 85, in doImport
[self.importRecord(record) for record in self.records]
File "c:\python27\lib\site-packages\trapp\import_lineup.py", line 112, in importRecord
self.parseLineup(record['Lineup'], game, record['teamID'], duration)
File "c:\python27\lib\site-packages\trapp\import_lineup.py", line 141, in parseLineup
batch = self.parsePlayer(starter, game, teamID, duration)
File "c:\python27\lib\site-packages\trapp\import_lineup.py", line 190, in parsePlayer
p.connectDB()
File "c:\python27\lib\site-packages\trapp\record.py", line 14, in connectDB
self.db.connect()
File "c:\python27\lib\site-packages\trapp\database.py", line 21, in connect
database=conn['dbschema']
File "c:\python27\lib\site-packages\mysql\connector\__init__.py", line 179, in connect
return MySQLConnection(*args, **kwargs)
File "c:\python27\lib\site-packages\mysql\connector\connection.py", line 95, in __init__
self.connect(**kwargs)
File "c:\python27\lib\site-packages\mysql\connector\abstracts.py", line 716, in connect
self._open_connection()
File "c:\python27\lib\site-packages\mysql\connector\connection.py", line 206, in _open_connection
self._socket.open_connection()
File "c:\python27\lib\site-packages\mysql\connector\network.py", line 512, in open_connection
errno=2003, values=(self.get_address(), _strioerror(err)))
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (10048 Only one usage of each socket address (protocol/network address/port) is normally permitted)
The text was updated successfully, but these errors were encountered:
From watching netstat during the import-lineups step, it looks like the number of MySQL connections grows significantly during the import process. My best guess at this point is that I'm not cleaning up database connections after myself at some key points of the import process, and as a result the speed of the new desktop is accumulating old connections faster than they're getting cleaned up.
Possible responses include:
Implementing connection pooling
Cleaning up after myself better
Adding a timer or other slowdown process to allow the computer to keep up
Pooling is probably the best option, but regardless I should be doing better about cleaning up after myself. I'm going to try that first.
This started cropping up after upgrading the desktop I use to run my import pipeline. A sample output is:
The text was updated successfully, but these errors were encountered: