>There is no error message, when I try to connect the database while >running vacuumdb with 300 jobs, it gets stuck. But you mentioned max connection which now seems to be a red herring. Based on your description, the impression I got is that you are getting "sorry, too many clients already" error. As others have pointed out, the db is probably saturated with I/O error.