Very slow Spring Boot application startup

后端 未结 8 1647

I have a simple Spring Boot application that connects to a PostgreSQL database and serves as a JSON service. Somehow the startup has become very slow, see timings 10:37:10 a

8条回答
  •  孤城傲影
    2020-12-23 10:18

    Are you running the tests on a local server? Perhaps there's some problem with the database server URL, such as a non-resolvable hostname or an IPv6 DNS entry, connecting with the same connection string from another application (e.g. http://squirrel-sql.sourceforge.net/) could confirm the problem.

    The delay is definitely logged when creating the database connection for the first time (either while loading the driver or performing the connection).

提交回复
热议问题