viabtc / viabtc_exchange_server

A trading engine with high-speed performance and real-time notification
MIT License
2.68k stars 1.48k forks source link

Help. Error on server restart #188

Open p-shidlovsky opened 5 years ago

p-shidlovsky commented 5 years ago

When i restart server its stops with error in oper_log What makes this happen or what can influence the appearance of an error? How to avoid it?

[2019-05-20 00:02:28.955377] me_persist.c:32(get_last_slice): get last slice time [2019-05-20 00:02:28.955787] me_persist.c:135(init_from_db): last_slice_time: 1558306800, last_oper_id: 10321830, last_order_id: 7188135, last_deals_id: 2415378 [2019-05-20 00:02:28.955823] me_persist.c:65(load_slice_from_db): load orders from: slice_order_1558306800 [2019-05-20 00:02:29.393739] me_persist.c:76(load_slice_from_db): load balance from: slice_balance_1558306800 [2019-05-20 00:02:29.395975] me_persist.c:94(load_operlog_from_db): load oper log from: operlog_20190519 [2019-05-20 00:02:29.408828] me_persist.c:105(load_operlog_from_db): load_operlog from operlog_20190519 fail: -528 ./matchengine.exe: init from db fail: -107

[2019-05-20 00:02:29.364984] [4915] [trace]me_load.c:21(load_orders): exec sql: SELECT id, t, side, create_time, update_time, user_id, market, price, amount, taker_fee, maker_fee, left, freeze, deal_stock, deal_money, deal_fee FROM slice_order_1558306800 WHERE id > 7132116 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.373959] [4915] [trace]me_load.c:21(load_orders): exec sql: SELECT id, t, side, create_time, update_time, user_id, market, price, amount, taker_fee, maker_fee, left, freeze, deal_stock, deal_money, deal_fee FROM slice_order_1558306800 WHERE id > 7162327 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.382065] [4915] [trace]me_load.c:21(load_orders): exec sql: SELECT id, t, side, create_time, update_time, user_id, market, price, amount, taker_fee, maker_fee, left, freeze, deal_stock, deal_money, deal_fee FROM slice_order_1558306800 WHERE id > 7182366 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.390453] [4915] [trace]me_load.c:21(load_orders): exec sql: SELECT id, t, side, create_time, update_time, user_id, market, price, amount, taker_fee, maker_fee, left, freeze, deal_stock, deal_money, deal_fee FROM slice_order_1558306800 WHERE id > 7187016 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.393764] [4915] [trace]me_load.c:84(load_balance): exec sql: SELECT id, user_id, asset, t, balance FROM slice_balance_1558306800 WHERE id > 0 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.395993] [4915] [trace]ut_mysql.c:36(is_table_exists): exec sql: SHOW TABLES LIKE 'operlog_20190519' [2019-05-20 00:02:29.396486] [4915] [trace]me_load.c:498(load_operlog): exec sql: SELECT id, detail from operlog_20190519 WHERE id > 10321830 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.403646] [4915] [trace]me_load.c:498(load_operlog): exec sql: SELECT id, detail from operlog_20190519 WHERE id > 10322830 ORDER BY id LIMIT 1000 [2019-05-20 00:02:29.408824] [4915] [error]me_load.c:526(load_operlog): load_oper: 10323570:{"method": "cancel_order", "params": [1754, "E2C_ETH", 7189129]} fail: -452 [2019-05-20 00:02:29.408827] [4915] [error]me_persist.c:104(load_operlog_from_db): load_operlog from operlog_20190519 fail: -528

lealife commented 5 years ago

You must remove market, and there are some old market's operlog on database.

p-shidlovsky commented 5 years ago

You must remove market, and there are some old market's operlog on database.

What do you mean by removing the market? clean up the database? Which table can store these old markets?

qyangdu commented 5 years ago

You may have removed some market from config matchengine file.