Deploying multiple play instances on same server

1,036 views
Skip to first unread message

kfer83

unread,
Jul 9, 2012, 8:55:31 PM7/9/12
to play-fr...@googlegroups.com
Hi. I looked at the documentation here  http://www.playframework.org/documentation/2.0.2/HTTPServer which says multiple instances can be deployed with the following example:

Let’s start the same Play application two times: one on port 9999 and one on port 9998.

$ start -Dhttp.port=9998
$ start -Dhttp.port=9999

After starting the first instance, I get the error message "The application is already running (Or delete the RUNNING_PID file).". I don't know what to do from here. Btw, a shorter way to specify the port is just "start <port>" 

C. Mundi

unread,
Jul 9, 2012, 11:36:46 PM7/9/12
to play-fr...@googlegroups.com

Hi.  I think they left out an implied concept.  You probably do not want two instances of a webapp using the same resources (e.g. database) until you set them up to respect the fact that the resources are shared.  So the running pid check is a safety feature.  They could explain that better.

If you just want to test your front end load balanced, you can make a complete copy of your app and start it in another directory.  Typically your multiple app instances would be on separate servers or VMs, yes? 

It would be nice to see a tutorial of an application in which multiple instances of the app share a common persistence layer.  If you find one, please let me know!

Thanks,
Carlos

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/5Kjc39lZ22kJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

El Softwarerero (the player formerly known as sun)

unread,
Jul 10, 2012, 9:04:57 AM7/10/12
to play-framework
I am just guessing: Probably you have issued "play start" before and
then pressed Ctrl-D, in that case your console was closed but the Play
app continues to run. You probably have to kill the Play process.

https://github.com/playframework/Play20/wiki/Production

C. Mundi

unread,
Jul 10, 2012, 9:29:37 AM7/10/12
to play-fr...@googlegroups.com

I confirmed the OPs report with the todolist tutorial app.  I first made sure that no other jvm process was running and that nothing was listening on the ports used.  Linux.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.

Gaëtan Renaudeau

unread,
Jul 10, 2012, 9:48:59 AM7/10/12
to play-fr...@googlegroups.com
AFAIK, I think for having 2 instance of the same application, you should have 2 distinct directories of this application.
1. It fix this RUNNING_PID file issue
2. Play2 may not work properly having 2 times the same app instance with the same folder, for instance, for the log file?

2012/7/10 C. Mundi <cmu...@gmail.com>



--
Gaëtan Renaudeau, greweb.fr

Ike

unread,
Jul 10, 2012, 11:59:36 AM7/10/12
to play-fr...@googlegroups.com
That's right, just think about each instance as a complete, separate clone of the app distribution. It may be in another server, another VM or just another directory on the same server.


On Tuesday, July 10, 2012 9:48:59 AM UTC-4, Gaetan Renaudeau wrote:
AFAIK, I think for having 2 instance of the same application, you should have 2 distinct directories of this application.
1. It fix this RUNNING_PID file issue
2. Play2 may not work properly having 2 times the same app instance with the same folder, for instance, for the log file?

2012/7/10 C. Mundi <cmu...@gmail.com>

I confirmed the OPs report with the todolist tutorial app.  I first made sure that no other jvm process was running and that nothing was listening on the ports used.  Linux.

On Jul 10, 2012 6:05 AM, "El Softwarerero (the player formerly known as sun)" <goo...@suncom.de> wrote:
I am just guessing: Probably you have issued "play start" before and
then pressed Ctrl-D, in that case your console was closed but the Play
app continues to run. You probably have to kill the Play process.

https://github.com/playframework/Play20/wiki/Production

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.



--
Gaëtan Renaudeau, greweb.fr

Reply all
Reply to author
Forward
0 new messages