Is there a limit to the number of database connections from a single machine in PostgreSQL?
You probably don't want more than 100 or so concurrent queries running on the DB. Use a connection pooler like pgbouncer if you need one and your app doesn't have one built-in.

See https://wiki.postgresql.org/wiki/Number_Of_Database_Connections

Setting a high max_connections won't make things go faster. It'll make things go slower.