webapp: close database cursors