我正在尝试在openshift中启动一个播放项目。第一阶段即项目的近15%已成功完成并上传。所以,我猜初始配置还可以。现在,在我完成了项目的其余部分之后,当我尝试使用ssh推送项目时,每次在一定时间后,远程服务器挂起并显示以下消息。
remote: [info] Done packaging.
remote: model contains 69 documentable templates
Connection to blogofprime-thatsqt.rhcloud.com closed by remote host.
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
To ssh://5455ef32e0b8cd379e000293@blogofprime-thatsqt.rhcloud.com/~/git/blogofprime.git/
+ 557ec12...4034b71 HEAD -> master (forced update)
远程服务器挂起后,每次都会发生这种情况。
我的openshift.conf文件:
# This is the main configuration file for the application.
# ~~~~~
include "application"
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
application.secret="V0sLX<RAciXw_>7^O8y=I4BRW/M4@vhVhF=H44`lMfgAV2hs^Pp?tsfroKt1J3eX"
# The application languages
# ~~~~~
application.langs="en"
# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://"${OPENSHIFT_MYSQL_DB_HOST}":"${OPENSHIFT_MYSQL_DB_PORT}"/"${OPENSHIFT_APP_NAME}
db.default.user=${OPENSHIFT_MYSQL_DB_USERNAME}
db.default.password=${OPENSHIFT_MYSQL_DB_PASSWORD}
# Evolutions
# ~~~~~
# You can disable evolutions if needed
# evolutionplugin=disabled
# Ebean configuration
# ~~~~~
# You can declare as many Ebean servers as you want.
# By convention, the default server is named `default`
#
ebean.default="models.*"
# Logger
# ~~~~~
# You can also configure logback (http://logback.qos.ch/), by providing a logger.xml file in the conf directory .
# Root logger:
logger.root=ERROR
# Logger used by the framework:
logger.play=INFO
# Logger provided to your application:
logger.application=DEBUG
我的build.sbt文件:
name := "thatsqt"
version := "1.0-SNAPSHOT"
scalaVersion := "2.11.2" // or "2.10.4"
libraryDependencies ++= Seq(
// Select Play modules
jdbc, // The JDBC connection pool and the play.api.db API
//anorm, // Scala RDBMS Library
javaJdbc, // Java database API
javaEbean, // Java Ebean plugin
javaJpa, // Java JPA plugin
filters, // A set of built-in filters
javaCore, // The core Java API
// WebJars pull in client-side web librarie
"org.webjars" %% "webjars-play" % "2.3.0",
"com.typesafe.play" %% "play-slick" % "0.8.0",
// Add your own project dependencies in the form:
// "group" % "artifact" % "version"
"mysql" % "mysql-connector-java" % "5.1.27"
)
fork in Test := false
lazy val root = (project in file(".")).enablePlugins(PlayJava)
EclipseKeys.withSource := true
平台: 我正在使用Mac OS X和类型安全激活器来播放框架。
我尝试了什么:
我试着在服务器和客户端unset TMOUT
。此时我不太确定这是否是超时问题或其他问题。
我的项目链接:https://github.com/magurmach/PlayOpenshiftThatsQt
我该如何解决这个问题?
答案 0 :(得分:0)
如果问题最近开始发生,可能是超出配额造成的。 使用1GB小齿轮耗尽空间是很常见的。
尝试使用rhc app-tidy rhc命令:
rhc app-tidy <app>
答案 1 :(得分:0)
您的项目是否包含大型二进制文件?这可能会导致git占用大量的RAM服务器端,而一个小的Openshift设备会占用占用太多RAM的东西。解决方案是ssh进入你的Openshift框(使用&#34; rhc ssh&#34;或等效的)并告诉服务器端git限制其RAM使用:
cd git/*.git
git config pack.windowMemory "25m"
git config pack.packSizeLimit "25m"
git config pack.threads "1"
为什么他们默认不这样做我不知道。
另外,下次要将大型二进制文件放入项目时,您不必 将它们检入git存储库(这将占用跟踪其整个历史记录的空间) :你可以只是指示你的应用程序根据需要从另一台服务器下载它们(第二台服务器只需要能够托管静态文件)。