# Deployment of Java Spring API using Dockerfile

**URL:** <https://community.fly.io/t/deployment-of-java-spring-api-using-dockerfile/6708>\
**Category:** Questions / Help\
**Created:** [August 29, 2022, 11:06am UTC](https://community.fly.io/t/deployment-of-java-spring-api-using-dockerfile/6708 "2022-08-29T11:06:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![renanfranca](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@renanfranca](https://community.fly.io/u/renanfranca)\
**Post date:** [September 2, 2022, 9:06pm UTC](https://community.fly.io/t/deployment-of-java-spring-api-using-dockerfile/6708/3 "2022-09-02T21:06:06Z")

</div>

I am facing the exactly same problem! I am trying to deploy a docker image of my application which is an angular + spring boot. My app only startup when I defined JAVA\_OPS = " -Xmx214m -Xms128m” as you did. But my application which is using java 11 failed to startup complete because out of memory, showing the following message:

```auto
[info] [194.978636] Out of memory: Killed process 515 (java) total-vm:2224432kB, anon-rss:201256kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:660kB oom_score_adj:0

```

I read in another forum post ([https://community.fly.io/t/oom-errors-on-free-tier-on-a-bare-application/2621/2](https://community.fly.io/t/oom-errors-on-free-tier-on-a-bare-application/2621/2)) that the " total-vm:2224432kB" meaning which is needed to startup, so is it need 2GB RAM?

 ![fly_io_deploy_not_working](https://global.discourse-cdn.com/fly1/original/3X/a/4/a425493b7904e85af8dd77b86c59e2b483508d4f.png)

---

_[View the full topic](https://community.fly.io/t/deployment-of-java-spring-api-using-dockerfile/6708)._
