connects to db but hangs server