Skip to content

Commit

Permalink
Use jemalloc to solve OOM problems with Sharp
Browse files Browse the repository at this point in the history
  • Loading branch information
heikkipora committed Jun 27, 2019
1 parent 2e0a1c1 commit b03584e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ansible/roles/app/templates/sataako.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ After=network.target

[Service]
Environment="NODE_ENV=production"
ExecStart=/bin/node --optimize-for-size --max-old-space-size=64 src/app.js
Environment="LD_PRELOAD=/usr/lib64/libjemalloc.so.1"
ExecStart=/bin/node --max-old-space-size=256 src/app.js
Restart=always
RestartSec=10
User=sataako
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/nodejs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
- gcc-c++
- make
- nodejs
- jemalloc

0 comments on commit b03584e

Please sign in to comment.