Improve remote db connection