0

私はGoogleCloud(現時点では無料アカウント)にアプリケーションを配備しようとしています。 FrontEnd(Angular)とBackEnd(Java/JPA/SpringBoot)は、単一の.jarでmavenでビルドされています。ジェンキンスとし、Googleシェルと私のサーバー上でローカルにMavenでGoogle App EngineにSpringBoot/Angular 4をデプロイ

、:

MVNスプリングブート:実行=>が細かい

作業が、私は

を展開しよう

mvn appengine:deploy =>502エラー

展開は成功としてマークです。しかし、私がログをチェックすると(gcloudアプリはtail -sをログに記録します)、SpringBootのデプロイメントはフリーズして、再起動し、再びフリーズするように見えます... そして、私は狂っています。

私は間違っていることを見つけるためにいくつかのアドバイスが必要です。

ここに私のpom.xml

https://maven.apache.org/xsd/maven-4.0.0.xsd " のxmlns:XSI =" だhttp://www.w3.org/ 2001/XMLスキーマ・インスタンス」のxmlns = "http://maven.apache.org/POM/4.0.0">

<modelVersion>4.0.0</modelVersion> 

<artifactId>back-office</artifactId> 
<name>back-office</name> 
<description>Back Office</description> 

<parent> 
    <groupId>fr.test</groupId> 
    <artifactId>mon-parent</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
</parent> 

<dependencies> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-mail</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.thymeleaf</groupId> 
     <artifactId>thymeleaf-spring4</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>nz.net.ultraq.thymeleaf</groupId> 
     <artifactId>thymeleaf-layout-dialect</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>net.sf.jasperreports</groupId> 
     <artifactId>jasperreports</artifactId> 
     <version>6.1.0</version> 
    </dependency> 
    <!-- BOOT --> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 
    <!-- PERSISTENCE --> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-data-jpa</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
    </dependency> 
    <!-- SECURITY --> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-security</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>com.nimbusds</groupId> 
     <artifactId>nimbus-jose-jwt</artifactId> 
     <version>4.39.2</version> 
    </dependency> 
    <dependency> 
     <groupId>joda-time</groupId> 
     <artifactId>joda-time</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-test</artifactId> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>fr.test</groupId> 
     <artifactId>front-office</artifactId> 
     <version>${project.version}</version> 
     <scope>runtime</scope> 
    </dependency> 
</dependencies> 

<repositories> 
    .... 
</repositories> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
     </plugin> 
     <plugin> 
      <groupId>com.google.cloud.tools</groupId> 
      <artifactId>appengine-maven-plugin</artifactId> 
      <version>1.3.1</version> 
     </plugin> 
    </plugins> 
</build> 

そして、ここでは、SRCの私のapp.yamlの設定(だ/メイン/ appengine)

# [START runtime] 
runtime: java 
env: flex 

handlers: 
- url: /.* 
    script: this field is required, but ignored 

runtime_config: # Optional 
    jdk: openjdk8 
# server: jetty9 

manual_scaling: 
    instances: 1 
# [END runtime] 

答えて

1

あなたが記述している症状に基づいて、アプリケーションのコンテナにメモリが不足していて、OOMキラーによって殺されている可能性があります。

デフォルトのFlex VMのメモリは1GBで、アプリケーションコンテナには600MBしかありません。

Google Cloud Logging UIのvm.syslogに、このようなメモリを見つけるのが一番の方法です。

kernel: [ 133.706951] Out of memory: Kill process 4490 (java) score 878 or sacrifice child 
kernel: [ 133.714468] Killed process 4306 (java) total-vm:5332376kB, anon-rss:2712108kB, file-rss:0k 

あなたapp.yamlにこれを追加することによって、メモリを増やしてみてください:

resources: 
    memory_gb: 4 
+0

あなたが正しいです。これは記憶不足です。あなたの答えと説明に感謝します! –

関連する問題