solving too many connection with mysql issue