ssuperczynski
ssuperczynski

Reputation: 3426

Play scala can not be started using Typesafe activator

I am trying to deploy Play scala project to my server which has 512mb RAM. When I am typing command ./activator run and trying to start the server, after 20min everything stop with message Resolving com.google.inject.extensions#guice-assistedinject;4.0

enter image description here

How do I fix it? Is it possible that I need more RAM? On my local machine (16gb RAM) everything works fine, project compile, and server works properly.

Upvotes: 0

Views: 114

Answers (2)

mgosk
mgosk

Reputation: 1876

The problem can be related with low available memory. You have few ways to workaround this:

  • Some VPS providers allow you to add SWAP memory. It is visible in system but works slower http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/
  • You can run app directly via SBT command sbt run. Activator need more memory that sbt, but difference isn't big.
  • You can compile app and prepare package on your machine and run it on VPS server. There are two useful tools for it sbt dist task and sbt-native-packager. Dist task is easier to use but native packeger have more configuration option and allow you to build system packages.

Personally I recommend to use sbt dist task on your machine, copy compiled app to remote server and run it.

Upvotes: 1

kmos.w
kmos.w

Reputation: 432

I faced similar issue past few weeks!

Using ./activator run command is only meant to deploy your play framework application in development mode. If you do that however, every time your application receives a new request, it will check with sbt to see if there are any changes and recompile the application again. As you might guess, this can have severe impact on your application in terms of performance.

Try to look here and let me know if it works

Upvotes: 2

Related Questions