error='Cannot allocate memory' (errno=12)

February 25, 2016 5k views
DigitalOcean
./solr start -f

Starting Solr on port 8983 from /opt/solr-5.2.1/server

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e8000000, 402653184, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/solr-5.2.1/server/hs_err_pid20901.log

Am using DigitalOcean VPS with RAM 512MB, the $5/month plan

4 comments
  • Look at the prerequisite section of the DO tutorial on installing solr 5.2.1

    Solr is a search engine platform based on Apache Lucene. It is written in Java and uses the Lucene library to implement indexing. It can be accessed using a variety of REST APIs, including XML and JSON. In this article, we will install Solr using its binary distribution.
  • am getting this error
    root@dindudu:/opt# ls installsolrservice.sh solr-5.2.1.tgz root@dindudu:/opt# sudo bash ./installsolrservice.sh solr-5.2.1.tgz Extracting solr-5.2.1.tgz to /opt Creating /etc/init.d/solr script ... System start/stop links for /etc/init.d/solr already exist. Waiting to see Solr listening on port 8983 [/] Still not seeing Solr listening on 8983 after 30 seconds! tail: cannot open ‘/var/solr/logs/solr.log’ for reading: No such file or directory

    Found 1 Solr nodes:

    Solr process 12410 from /var/solr/solr-8983.pid not found. Service solr installed. root@dindudu:/opt# sudo service solr status

    Found 1 Solr nodes:

    Solr process 12410 from /var/solr/solr-8983.pid not found. root@dindudu:/opt# service solr start Waiting to see Solr listening on port 8983 [/] Still not seeing Solr listening on 8983 after 30 seconds! tail: cannot open ‘/var/solr/logs/solr.log’ for reading: No such file or directory root@dindudu:/opt# /etc/init.d/solr status

    Found 1 Solr nodes:

    Solr process 12855 from /var/solr/solr-8983.pid not found. How to fix this error

  • @dineshmaths - What's the memory size of your droplet again?

  • Did you solve by increasing the droplet size ?

    I run a similar issue. I use Play Scala on Dokku ( no Solr ) . I thought the 5$ droplet was enough to handle this.

Be the first one to answer this question.