我正在尝试通过不同的端口部署同一个Play应用程序的两个实例,然后通过前面的nginx进行负载均衡。
按照手册,要开始播放的多个实例,这些是命令。
$ start -Dhttp.port=9998
$ start -Dhttp.port=9999
但是,如果我给了这些命令,第一个命令会在端口9998上正确启动我的应用程序,但是第二个命令却无法通过给出以下消息来启动我的应用程序。
This application is already running (Or delete /play/app/folder/RUNNING_PID file)
我正在使用Ubuntu 12.05。
那么,如何启动单个播放实例的多个实例?
$ start -Dhttp.port=9998 -Dpidfile.path=/path/to/app1/pidfile
$ start -Dhttp.port=9999 -Dpidfile.path=/path/to/app2/pidfile
只要确保您传递给每个应用程序的两个pidfile路径是不同的即可。
在此处记录:
http://www.playframework.com/documentation/2.2.x/ProductionConfiguration
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句