Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2 closing postgres connection #10

Closed
brianwu02 opened this issue Oct 28, 2013 · 1 comment
Closed

psycopg2 closing postgres connection #10

brianwu02 opened this issue Oct 28, 2013 · 1 comment

Comments

@brianwu02
Copy link

pretty weird issue. i have no problem running nfldb-update on my local machine but when trying to run on new virtual machine(if it means anything, this is VPS) i get this:

here's the pip freeze:
argparse==1.2.1
beautifulsoup4==4.3.2
enum34==0.9.19
httplib2==0.8
nfldb==0.0.11
nflgame==1.1.21
psycopg2==2.5.1
pytz==2013b
wsgiref==0.1.2

and here's the error:

STARTING NFLDB UPDATE AT 2013-10-28 10:42:57.612357
Connecting to nfldb... done.
Setting timezone to UTC... done.
Locking write access to tables... done.
Updating season phase, year and week... done.
Bulk inserting data for 14 games...
Sending batch of data to database.
Traceback (most recent call last):
File "/home/ocean/fantasyfootball/.env/bin/nfldb-update", line 408, in
doit()
File "/home/ocean/fantasyfootball/.env/bin/nfldb-update", line 398, in doit
update(db, player_interval=args.player_interval)
File "/home/ocean/fantasyfootball/.env/bin/nfldb-update", line 344, in update
log('done.')
File "/home/ocean/fantasyfootball/.env/local/lib/python2.7/site-packages/nfldb/db.py", line 295, in exit
self.__conn.rollback()
psycopg2.InterfaceError: connection already closed

pg_hba.conf and config.ini are the same

@brianwu02
Copy link
Author

changed bin/nfldb-update
_batch_size = 150

to

_batch_size = 5

hoepfully your vps has more than 512mb of ram!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant