fix database connection management: no more open ... close within each request