ctubio / Krypto-trading-bot

Self-hosted crypto trading bot (automated high frequency market making) written in C++

Home Page:https://127.0.0.1:3000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segfaults en masse SSL_get_error

durrhurr991 opened this issue · comments

now after having the gui running properly and being able to make quite high frequency trades it seems to start crashing after a certain amount of trades in the history or keeps getting quota errors and then have to restart

06/11 21:17:34.631297 Errrror: Segmentation fault (Three-Headed Monkey found):

  • exchange: KUCOIN
  • currency: BTC/USDT
  • binbuild: K-trading-bot linux-x86_64
  • lastbeat: 37265
  • tracelog:
    8: K-trading-bot(_start+0x2a) [0x558f1350161a]
    7: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fc5109240b3]
    6: K-trading-bot(main+0x1e) [0x558f134fe13e]
    5: K-trading-bot(_ZN3₿6Events4walkEv+0x7f) [0x558f13510a2f]
    4: K-trading-bot(_ZNK3₿9WebServer8Frontend6ioHttpMUlvE_clEv+0x1f) [0x558f1352c27f]
    3: K-trading-bot(_ZN3₿9WebServer8Frontend2ioEv+0x99) [0x558f1351e509]
    2: K-trading-bot(SSL_get_error+0x65) [0x558f1372f935]
    1: /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7fc510943210]
    0: K-trading-bot(_ZN3₿6Ending3wtfEi+0x28f) [0x558f1356abff]

this the crashlog it seems to be ssl related

i dont know how to repdocue this error, what browser are you using to access the UI? and what certificates are you using in the bot?

i would say you are having some issue with the certificates, can you see if #1016 helps?

firefox 89 on Linux VirtualBox 5.8.0-55-generic #62~20.04.1-Ubuntu SMP x86_64 (standard unaltered 20.04.1)
runs now with without-ssl but besides that nothing out of the ordinary settings.

also noticed that once in a while it just hangs or has oderbook issues but i think that is kucoin exclusive. havent tried any other exchange yet but will probably have a second instance on binance

but other than that im pretty amazed about how the trade freq to profit ratio is just right even with more or less stock settings

i`ll just allocate another core or even a little more ram and vram and see how that goes it seems a bit laggy even with 2cores and 8gb

note is a single thread application, so only uses 1 core always; and also the ram in-use for each instance is very little, you can see it displayed in the bottom of the frontend; should be less than 100Mb

20MB even lmao. might setup an alpine box for that then just ssh into it and give it a passthrough for webui

🐨 in case you still wana fix this issue, let me know if you using the built-in certificate or are you using --ssl-crt and --ssl-key arguments