we have qt4.5.2 on our server, powerpc64 opensuse 11.1. db2 driver version 9.5 fp 4.
we have following problem:
our server software makes connection to db2 database(remotely) for each new client thread. when thread is closed we are making database connection close.

this->mydb->query.finish();
this->mydb->query.clear();
this->mydb->dbase.close();
QSqlDatabase::removeDatabase(dbname);

we checked client connection. the code above is being executed gracefully. connection is being closed. BUT: after about a 24 hour number of connections to the database is much more than expected. i.e. apparently some connections aren't being closed. each of excessive connections have status "connected". that should mean that after query. finish() and query.clear() dbase close doesn't work properly.\

beyond this, when giving command in console "netstat -an |grep -i :50000 |wc | awk '{print $1}'" i give in console the output which says that number of connections to the database, which the database itself shows, including excessive connections.
"ls /proc/{pid of my server application}/fd | wc | awk '{print $1}'" shows same number of excessive connections.

please give advice how should we handle this problem.