mirror of
https://github.com/mempool/mempool.git
synced 2025-01-01 03:04:27 +01:00
befb192651
On powerful servers, nodejs automatically sets the limit at 4GB ``` % node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)' node heap limit = 4144 Mb ``` On a Raspberry Pi with 8GB RAM, nodejs automatically sets the limit at 1GB ``` % node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)' node heap limit = 1048 Mb ``` On a Raspberry Pi with 4GB RAM, nodejs automatically sets the limit at 740MB ``` % node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)' node heap limit = 739.4694900512695 Mb ``` After testing with manually setting the limit to 768MB, mempool starts up fine, but crashes when saving the cache when the mempool is quite large (over 400MB with custom bitcoin.conf setting). So it's probably safe to reduce the 4GB limit setting to 2GB for all devices and and just use the automatically set values, now that the backend's disk cache memory usage was recently optimized. However, a new npm script for `npm run start-production` will be added so we can keep our production mempool.space servers running with a very large bitcoin.conf mempool
51 lines
1.3 KiB
JSON
51 lines
1.3 KiB
JSON
{
|
|
"name": "mempool-backend",
|
|
"version": "2.0.0",
|
|
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
|
|
"license": "MIT",
|
|
"homepage": "https://mempool.space",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/mempool/mempool"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/mempool/mempool/issues"
|
|
},
|
|
"keywords": [
|
|
"bitcoin",
|
|
"mempool",
|
|
"blockchain",
|
|
"explorer",
|
|
"liquid"
|
|
],
|
|
"main": "index.ts",
|
|
"scripts": {
|
|
"ng": "./node_modules/@angular/cli/bin/ng",
|
|
"tsc": "./node_modules/typescript/bin/tsc",
|
|
"build": "npm run tsc",
|
|
"start": "node --max-old-space-size=2048 dist/index.js",
|
|
"start-production": "node --max-old-space-size=4096 dist/index.js",
|
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
},
|
|
"dependencies": {
|
|
"@mempool/bitcoin": "^3.0.2",
|
|
"@mempool/electrum-client": "^1.1.7",
|
|
"axios": "^0.21.1",
|
|
"bitcoinjs-lib": "^5.2.0",
|
|
"crypto-js": "^4.0.0",
|
|
"express": "^4.17.1",
|
|
"locutus": "^2.0.12",
|
|
"mysql2": "2.2.5",
|
|
"node-worker-threads-pool": "^1.4.2",
|
|
"ws": "^7.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/compression": "^1.0.1",
|
|
"@types/express": "^4.17.2",
|
|
"@types/locutus": "^0.0.6",
|
|
"@types/ws": "^6.0.4",
|
|
"tslint": "~6.1.0",
|
|
"typescript": "~3.9.7"
|
|
}
|
|
}
|