Bitcoin Forum
May 03, 2024, 05:21:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mempool.Space Production Server  (Read 191 times)
akechwalcahnpac (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 58


View Profile
June 29, 2023, 06:21:27 AM
Last edit: June 29, 2023, 06:40:18 AM by akechwalcahnpac
Merited by pooya87 (4), LoyceV (4), hugeblack (4), vapourminer (2), philipma1957 (2), ABCbits (2), JayJuanGee (1), RickDeckard (1)
 #1

The last 3 days, I tried to setup a Mempool.Space Production (https://github.com/mempool/mempool/tree/master/production) Server and failed. The autoinstall is not working, neither for FreeBSD 13 nor for Debian. Because this was not working, I have decided to set it up all by myself step by step.
Blockstream/electrs is fully working (and synced) for bitcoin (all variants) and elements (all variants).

The Documentation is a bit shitty, thats why you have to find things on your own. For example the testnet will not start (syncing) if you run the node with config. You have to start mainnet, then testnet and then stagenet on their own.

Till the bisq step everything is now set up and working fine.
Bisq is always running into some weird memory issues. As soon as I start, it runs fine for 30min and then runs into the issue, that it takes more memory than it should and shuts down.

All the mempool-config.*.json have in common that there is an error. You can either use "REST_API_URL" or "UNIX_SOCKET_PATH" in the config. Not both!
(For Debian the Database socket is wrong! it has to be: /var/run/mysqld/mysqld.sock)

After everything set up and all backends are running and connecting frontend with backend I am getting this error:
Error loading address data.
(<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /api/v1/address/SOMEWALLET</pre> </body> </html> )

When changing from esplora to electrum, then the wallet is shown, but only the Balance. The informations about sent or received are not shown.

Does anybody tried to setup the Production Server on their own?
Server specs are
CPU AMD EPYC 7401P
RAM: 128GB
SSD: 2 x 1.92 TB Datacenter SSD in Software Raid 1
1714713708
Hero Member
*
Offline Offline

Posts: 1714713708

View Profile Personal Message (Offline)

Ignore
1714713708
Reply with quote  #2

1714713708
Report to moderator
1714713708
Hero Member
*
Offline Offline

Posts: 1714713708

View Profile Personal Message (Offline)

Ignore
1714713708
Reply with quote  #2

1714713708
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714713708
Hero Member
*
Offline Offline

Posts: 1714713708

View Profile Personal Message (Offline)

Ignore
1714713708
Reply with quote  #2

1714713708
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6726


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 29, 2023, 06:28:20 AM
 #2

The Bisq installation is using too much memory when there's 128GB of memory installed? How did that happen? It must've been a very monstrous memory leak.

Sometimes I see Bisq using 4-6GB of RAM, but it's a Java application so it's supposed to have a command line option like -Xmx or something that limits the maximum heap memory it can use.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
akechwalcahnpac (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 58


View Profile
June 29, 2023, 07:15:39 AM
Merited by vapourminer (5), NotATether (5), EFS (4), pooya87 (4), LoyceV (4), hugeblack (4), o_e_l_e_o (4), ABCbits (2), JayJuanGee (1), BitMaxz (1)
 #3

For everyone who get stuck the solution is fairly easy and took me a while. You have to adjust the API settings in nginx:
        location /api/ {
                set $new_request_uri $request_uri;
                            if ($request_uri ~ ^/api/(.+)$) {
                                        set $new_request_uri $1;
                                }
                proxy_pass http://127.0.0.1:5000/$new_request_uri;
        }

This solution is only for mainnet!





The Bisq installation is using too much memory when there's 128GB of memory installed? How did that happen? It must've been a very monstrous memory leak.

Sometimes I see Bisq using 4-6GB of RAM, but it's a Java application so it's supposed to have a command line option like -Xmx or something that limits the maximum heap memory it can use.
The bisq is limited to 8gb RAM on my system. It recognize by itself, when it is using to much RAM (80% of 8gb RAM) and then shuts down itself.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
June 29, 2023, 04:53:52 PM
Merited by hugeblack (5), EFS (4), pooya87 (4), LoyceV (4), ABCbits (4), o_e_l_e_o (4), JayJuanGee (1), BitMaxz (1)
 #4

The Documentation is a bit shitty, thats why you have to find things on your own.
I recently just did exactly this and can attest that the documentation is quite poor. There is little to no explanation of what the available config options are nor what they even do.

After everything set up and all backends are running and connecting frontend with backend I am getting this error:
Error loading address data.
(<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /api/v1/address/SOMEWALLET</pre> </body> </html> )
Fought with this same issue for a while.

It turns out when you use the esplora mode, mempool.space itself will not serve the apis that are also served by electrs. Those apis are everything at the /api endpoint, whereas electrs uses /api/v1. The example nginx config essentially passes through /api to /api/v1, but that's incorrect for electrs.

Your config probably has

Code:
location /api/ {
proxy_pass http://127.0.0.1:8999/api/v1/;
}

Change that to

Code:
location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://127.0.0.1:3000/;
}

PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
June 30, 2023, 02:24:49 PM
 #5

I know mempool.space looks nice, but may I ask why did you decide to use that server and not btc-rpc-explorer (https://github.com/janoside/btc-rpc-explorer)?
Do you plan to expose your server to the world or is it purely for private use?
akechwalcahnpac (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 58


View Profile
November 09, 2023, 08:13:18 AM
Merited by LoyceV (4)
 #6

A small hint for everyone experience crashing on the mempool.space backend here is a small solution:
Edit backend/package.json

    "start": "node --max-old-space-size=8192 dist/index.js",
    "start-production": "node --max-old-space-size=16384 dist/index.js",

And increase the default "2048" to whatever you want/need
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!