The Wayback Machine - https://web.archive.org/web/20200918093139/https://github.com/php-telegram-bot/core/issues/1003
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the growth of the database #1003

Open
damianperez opened this issue Sep 19, 2019 · 0 comments
Open

Limit the growth of the database #1003

damianperez opened this issue Sep 19, 2019 · 0 comments

Comments

@damianperez
Copy link

@damianperez damianperez commented Sep 19, 2019

馃帀 Feature Request

Limit the growth of the database

Summary

Setting the days to save in logs of the tables in webhook

If the bot exceeds a number of users that any server service can handle, the tables begin to grow exponentially. It would be good if (for example, the request_limiter table) does not store more than what is previously configured in the bot initialization. With thousands of records in the db, cleanup is almost impossible.
A possible solution would be to find an appropriate key in the tables so that you can do:
insert ignore into .... on duplicate key update ...
If not, compare the preset number of records in initialization with the amount in the table and clean them automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can鈥檛 perform that action at this time.