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

after tgdata.db become lager, telegram can't send message to wechat, and there are no error log. #111

Open
QQ-War opened this issue Oct 21, 2021 · 2 comments

Comments

@QQ-War
Copy link

QQ-War commented Oct 21, 2021

I set the flag to send to last chat by default. after 5 month use, the size of tgdata.db reach to 19M.

now, telegram can receive message from wechat, no problem. but if I sent message, which only arrive to the server running ehforwarderbot, and it will not send to wechat.

if I run this bot by ehforwarderbot -v, there will be no error log. only you can see, after telegram master get the message, it only handle by efb_telegram_master.locale_handler. normally, the next step is efb_telegram_master.master_message, but it doesn't happen.

After i clear the table msglog, and test for two days, seems ok.

@QQ-War QQ-War changed the title tgdata.db 数据量过大以后,telegram发送信息无法到达wechat,且无日志报错记录 after tgdata.db become lager, telegram can't send message to wechat, and there are no error log. Oct 22, 2021
@blueset
Copy link
Member

blueset commented Oct 22, 2021

Thanks for experimenting and the detailed report. I’ll try to investigate on the cause of the issue and a solution for it. If you have any better idea on fixing the code, feel free to comment below or send in a PR.

@QQ-War
Copy link
Author

QQ-War commented Oct 22, 2021

Thanks for quick response.

  1. My temporary solution is to create a task to backup the msglog and clean this table every night.
    maybe the backup is not necessary ,since all message is already inside telegram.
  2. My code skill is not that good, I would like to help to check the code in depth, but maybe can help less. My thinking on this issues is maybe because of the read and write of big file takes a lot of time, then the database is locked by wechat slave, so the telegram master can only set the locale and don't have resouce to handle message.
    One suggestion is to give an option to use Mysql.

45 23 * * * sqlite3 /home/ubuntu/.ehforwarderbot/profiles/default/blueset.telegram/tgdata.db '.dump msglog'>/home/ubuntu/.ehforwarderbot/profiles/default/blueset.telegram/msglog.sql
55 23 * * * sqlite3 /home/ubuntu/.ehforwarderbot/profiles/default/blueset.telegram/tgdata.db.bak '.read /home/ubuntu/.ehforwarderbot/profiles/default/blueset.telegram/msglog.sql'
0 0 * * * sqlite3 /home/ubuntu/.ehforwarderbot/profiles/default/blueset.telegram/tgdata.db 'delete from msglog;'

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

No branches or pull requests

2 participants