:db.error/not-enough-memory when (init-db) is run in lein repl from Intermediate-Tutorial #101

Closed
tomazzlender opened this Issue Feb 8, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@tomazzlender

I am following steps in the Intermediate Tutorial https://github.com/swannodette/om/wiki/Intermediate-Tutorial.

In a step involving (init-db) REPL returns error...

IllegalArgumentExceptionInfo :db.error/not-enough-memory (datomic.objectCacheMax + datomic.memoryIndexMax) exceeds 75% of JVM RAM datomic.error/arg (error.clj:55)

Does anyone know why and how to fix it?

Any help is much appreciated.

@swannodette

This comment has been minimized.

Show comment
Hide comment
@swannodette

swannodette Feb 8, 2014

Member

Try adding :jvm-opts ^:replace ["-Xmx1g" "-server"] to your project.clj and seeing if that helps. If it does I can push a new version of the tutorial template.

Member

swannodette commented Feb 8, 2014

Try adding :jvm-opts ^:replace ["-Xmx1g" "-server"] to your project.clj and seeing if that helps. If it does I can push a new version of the tutorial template.

@tomazzlender

This comment has been minimized.

Show comment
Hide comment
@tomazzlender

tomazzlender Feb 8, 2014

Unfortunately it doesn't.

Here is a complete project.clj file.

(defproject om-async "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2138"]
                 [ring/ring "1.2.1"]
                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
                 [om "0.3.6"]
                 [compojure "1.1.6"]
                 [fogus/ring-edn "0.2.0"]
                 [com.datomic/datomic-free "0.9.4532"]]

  :plugins [[lein-cljsbuild "1.0.2"]]

  :source-paths ["src/clj" "src/cljs"]
  :resource-paths ["resources"]

  :cljsbuild {
    :builds [{:id "dev"
              :source-paths ["src/clj" "src/cljs"]
              :compiler {
                :output-to "resources/public/js/main.js"
                :output-dir "resources/public/js/out"
                :optimizations :none
                :source-map true}}]})

  :jvm-opts ^:replace ["-Xmx1g" "-server"]

Unfortunately it doesn't.

Here is a complete project.clj file.

(defproject om-async "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2138"]
                 [ring/ring "1.2.1"]
                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
                 [om "0.3.6"]
                 [compojure "1.1.6"]
                 [fogus/ring-edn "0.2.0"]
                 [com.datomic/datomic-free "0.9.4532"]]

  :plugins [[lein-cljsbuild "1.0.2"]]

  :source-paths ["src/clj" "src/cljs"]
  :resource-paths ["resources"]

  :cljsbuild {
    :builds [{:id "dev"
              :source-paths ["src/clj" "src/cljs"]
              :compiler {
                :output-to "resources/public/js/main.js"
                :output-dir "resources/public/js/out"
                :optimizations :none
                :source-map true}}]})

  :jvm-opts ^:replace ["-Xmx1g" "-server"]
@swannodette

This comment has been minimized.

Show comment
Hide comment
@swannodette

swannodette Feb 8, 2014

Member

You put :jvm-opts outside of the project definition.

Member

swannodette commented Feb 8, 2014

You put :jvm-opts outside of the project definition.

@tomazzlender

This comment has been minimized.

Show comment
Hide comment
@tomazzlender

tomazzlender Feb 8, 2014

Ah, of course. It works perfectly now.

Thank you for your help!

Ah, of course. It works perfectly now.

Thank you for your help!

@swannodette swannodette closed this Feb 8, 2014

@swannodette

This comment has been minimized.

Show comment
Hide comment
@swannodette

swannodette Feb 8, 2014

Member

I've released a new version of the tutorial template so that people don't have to set it explicitly.

Member

swannodette commented Feb 8, 2014

I've released a new version of the tutorial template so that people don't have to set it explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment