Skip to content
Advertisement

Tag: database

Making sure that psycopg2 database connection alive

I have a python application that opens a database connection that can hang online for an hours, but sometimes the database server reboots and while python still have the connection it won’t work with OperationalError exception. So I’m looking for any reliable method to “ping” the database and know that connection is alive. I’ve checked a psycopg2 documentation but can’t

Python and MySQL: is there an alternative to MySQLdb?

Is there a module written purely in Python that will allow a script to communicate with a MySQL database? I’ve already tried MySQLdb without success. It requires too much: GCC, zlib, and openssl. I do not have access to these tools; even if I did, I don’t want to waste time getting them to work together. I’m looking for tools

Advertisement