galaxy-genome-annotation / docker-tripal

Docker container for Tripal
10 stars 11 forks source link

ElasticSearch options, and database settings #23

Closed cganote closed 6 years ago

cganote commented 7 years ago

Heya,

Seeing this when I run docker:


~/docker-tripal-->docker-compose up
Starting dockertripal_elasticsearch_1
Starting dockertripal_db_1
Starting dockertripal_tripal_1
Attaching to dockertripal_elasticsearch_1, dockertripal_db_1, dockertripal_tripal_1
elasticsearch_1  | OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
elasticsearch_1  | #
elasticsearch_1  | # There is insufficient memory for the Java Runtime Environment to continue.
elasticsearch_1  | # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
elasticsearch_1  | # Can not save log file, dump to screen..
elasticsearch_1  | #
elasticsearch_1  | # There is insufficient memory for the Java Runtime Environment to continue.
elasticsearch_1  | # Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
elasticsearch_1  | #  Out of Memory Error (os_linux.cpp:2630), pid=1, tid=0x00007feb6ef45700
elasticsearch_1  | # JRE version:  (8.0_121-b13) (build )
elasticsearch_1  | # Java VM: OpenJDK 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops)
elasticsearch_1  | # Core dump written. Default location: /usr/share/elasticsearch/core or core.1

Any way to alter the -Xmx settings? I'm launching on a very small vm with 2gb of memory total. Later on in the same launch:
dockertripal_elasticsearch_1 exited with code 1
db_1             | FATAL:  database "tripal" does not exist
tripal_1         | psql: FATAL:  database "tripal" does not exist
dockertripal_tripal_1 exited with code 2
``

Oddly, if I try to create it:
createdb tripal
createdb: database creation failed: ERROR:  database "tripal" already exists

Any ideas?
abretaud commented 7 years ago

Hi Carrie, Funny, I add the exact same problem here today! Adding the following env var to your docker-compose.yml should help (searches might be slower though):

  elasticsearch:
    image: elasticsearch
    environment:
        ES_JAVA_OPTS: "-Xms150m -Xmx150m"

For the tripal db not existing, there was some changes to the code within the last days, are you using the latest image/docker-compose.yml ?