Creating an entrypoint to load resources on app startup?

I have an app that’s working fine on my dev machine.

On deployment to the server, the app gets stuck on this log:

2020-07-18 00:13:55 INFO akka.event.slf4j.Slf4jLogger Slf4jLogger started

After that, there’s no output, not even println statements placed at the top of my controllers which are the first logs printed on my dev machine.

I think its because the server has lower memory / cpu than dev, and is taking a long time to load resources.

Is there a way to place an entrypoint around the app which loads the resources in a controlled way, and provides logs in the process, so i can see what’s going on during the loading?

Hi @aliakhtar,

when you say:

what resources are you referring to?

You can, for example, enable the Class Loader logs adding the -verbose:class argument to the JVM (this is not Play specific). Another option would be to enable GC logs so you can see if there’s too much load trying to free memory with little gains.
Alternatively, you can also run the process locally with the same memory restrictions that you have in production. I would suggest you don’t use the dev mode (e.g. sbt run) and instead, package the application and run it locally in production mode.

Cheers,