I am having a lot of issues regarding my Spring Boot application that is starting as normal, but when I access a page that is secured by Spring security, it takes a lot of time to load the page.
If I click on the /userpage icon, then the login screen should appear if not logged in. Well, in this case the display of login screen takes up to 5 minutes. Same thing for the /process_login (the link created to produce the login).
Things that I did from the internet:
I did placed
logging.level.org.springframework.boot.autoconfigure=DEBUG
in the application.properties, nothing relevant in the logsI start the application on a 1CPU, 1GB RAM virtual machine on OceanDigital. There were no issues of this type on my Idea editor on my PC. The db is a MongoCluster from MongoAtlas.
I think it is related to the application start-up options. I start the application like this:
./mvnw spring-boot:run &
orman spring-boot:run &
(I add & to make it work in the background.)ByCrpyt len is 4.
After the login is performed, then any other request, including a new login is done with easy, in a matter of ms.
Any suggestions?
UPDATE
When I connect with the Idea Editor to the remote server and run on it, this issue does not appear. So I still think it is a matter of start-up command or configuration.
UPDATE 2
I got this Warn: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [607,720] milliseconds.