Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useUnifiedTopology=true needs to be in db_url (updated package.json attached, also) #18

Open
TinosNitso opened this issue Aug 26, 2022 · 0 comments

Comments

@TinosNitso
Copy link

I set db_url (in index.js) to
mongodb://tinos.ml:27017/?useNewUrlParser=true&useUnifiedTopology=true&connectTimeoutMS=3600000&socketTimeoutMS=1200000
Worst case scenario for slpdb we can set a 20min (or 1hr) timeout & if anything ever goes wrong it takes at least 20 mins for the crash to occur & a .sh or .bat script to $0 or %0 restart the whole process. The timeout sets the time for the server to effectively reboot if something bad happens.
I've raised a Windows compatibility issue with fountainhead-core. It turns out it can use mongodb module v4, whereas SLPDB only supports v3.
Here is the package.json I used to npm install in Win10. However I'll be switching back to WSL1 (Ubuntu) today, since there is a bug in node.exe which makes both SLPDB & SLPServe extremely slow. I decided to waste a couple days proving it to myself. Node doesn't really support Windows! More updates to the dependencies below are possible, these are just what I used to try speed up the Windows version:

  "dependencies": {
    "bignumber.js": "~9.0.0",
    "bitcore-lib-cash": "8.25.36",
    "cors": "^2.8.5",
    "dotenv": "16.0.1",
    "ejs": "^2.6.1",
    "express": "^4.16.3",
    "express-rate-limit": "^3.3.2",
    "fountainhead-core": "0.0.12",
    "iconv-lite": "0.6.3",
    "ip": "^1.1.8",
    "mongodb": "4.9.0",
    "node-jq": "2.3.3",
    "p-queue": "3.2.0",
    "traverse": "0.6.6",
    "zeromq": "^5.2.8"
  }

I also set slpserve_timeout : 300000 due to extreme slowness in Windows. (I happen to know WSL1 is faster than WSL2 which is faster than Hyper-V which is faster than VirtualBox, and I was truly astounded that node.exe may be even slower than VBox.) Btw my exact version is v16.17.0 (v17 & up no longer support RIPEMD160).
I'm running SLPDB instance currently at slpdb.tinos.ml.
I also have a running sync journal on Reddit, here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant