stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    Making ElasticSearch work in a Django app on WebFaction

    These are some things I had to do to make ElasticSearch work in a Django app I deployed to WebFaction. After telnetting to the server:

    Set ES_HEAP_SIZE environment variable to lower than 512 MB, e.g.

    set ES_HEAP_SIZE=256mb
    export ES_HEAP_SIZE=256mb
    

    Check ES_HEAP_SIZE environment variable is set:

    printenv ES_HEAP_SIZE
    

    Switch to Java 1.8:

    echo "PATH=\$HOME/jdk1.8.0_45/bin/:\$PATH" >> .bash_profile
    source .bash_profile
    

    Run ElasticSearch as daemon:

    From elasticsearch-1.5.2 directory:

    bin/elasticsearch -d
    

    Inspect memory used:

    ps aux --sort -rss
    

    Top RSS value should be 255640 or thereabouts (i.e. less than 256 MB).