[GH-ISSUE #1103] huge database problem #749

Closed
opened 2026-10-31 20:14:09 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @kalilovers on GitHub (Oct 4, 2023).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1103

Welcome

  • Yes, I'm using the latest major release. Only such installations are supported.
  • Yes, I'm using the supported system. Only such systems are supported.
  • Yes, I have read all WIKI document,nothing can help me in my problem.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, log, etc).

Description of the problem,screencshot would be good

There is a big problem in the database. When we delete users, they remain in the database and over time it causes the database to become heavy and problematic. For this reason, even though the number of clients decreases, the size of the database only increases

so important . i checked with sql lite

i have only 400 client . most of these removed in panel . update not fix it

https://app.gemoo.com/share/image-annotation/568139105089368064?codeId=DGqyN1EjOxBab&origin=imageurlgenerator

Version of 3x-ui

# Paste here

x-ui log reports or xray log

# paste log here
Originally created by @kalilovers on GitHub (Oct 4, 2023). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/1103 ### Welcome - [X] Yes, I'm using the latest major release. Only such installations are supported. - [X] Yes, I'm using the supported system. Only such systems are supported. - [X] Yes, I have read all WIKI document,nothing can help me in my problem. - [X] Yes, I've searched similar issues on GitHub and didn't find any. - [X] Yes, I've included all information below (version, config, log, etc). ### Description of the problem,screencshot would be good There is a big problem in the database. When we delete users, they remain in the database and over time it causes the database to become heavy and problematic. For this reason, even though the number of clients decreases, the size of the database only increases so important . i checked with sql lite i have only 400 client . most of these removed in panel . update not fix it https://app.gemoo.com/share/image-annotation/568139105089368064?codeId=DGqyN1EjOxBab&origin=imageurlgenerator ### Version of 3x-ui <latest> ```console # Paste here ``` </details> ### x-ui log reports or xray log <details> ```console # paste log here ``` </details>
Author
Owner

@StayAway32 commented on GitHub (Oct 5, 2023):

@AmoAlireza can you do the same on ssh ? is it possible to install sqlite on my pc and remotely connect to servers db to issue cleaning stuff like vacuum ? thanks

<!-- gh-comment-id:1748837739 --> @StayAway32 commented on GitHub (Oct 5, 2023): @AmoAlireza can you do the same on ssh ? is it possible to install sqlite on my pc and remotely connect to servers db to issue cleaning stuff like vacuum ? thanks
Author
Owner

@StayAway32 commented on GitHub (Oct 5, 2023):

or if there is a command i can use after :
apt-get install sqlite3
in order to get the vacuum going via ssh
thanks

<!-- gh-comment-id:1748845197 --> @StayAway32 commented on GitHub (Oct 5, 2023): or if there is a command i can use after : apt-get install sqlite3 in order to get the vacuum going via ssh thanks
Author
Owner

@StayAway32 commented on GitHub (Oct 6, 2023):

@AmoAlireza thanks alot i have done the following and put the line in the config it brought for me :)
have a great day

<!-- gh-comment-id:1751487481 --> @StayAway32 commented on GitHub (Oct 6, 2023): @AmoAlireza thanks alot i have done the following and put the line in the config it brought for me :) have a great day
Author
Owner

@kalilovers commented on GitHub (Oct 9, 2023):

yes you can. first install sqlite3: apt install sqlite3 enter the crontab: crontab -e then enter this line: 0 0 * * * sqlite3 /etc/x-ui/x-ui.db 'VACUUM;'

this will vacuum the database file every day automatic.

whats do this vacuum ?

<!-- gh-comment-id:1752848764 --> @kalilovers commented on GitHub (Oct 9, 2023): > yes you can. first install sqlite3: `apt install sqlite3` enter the crontab: `crontab -e` then enter this line: `0 0 * * * sqlite3 /etc/x-ui/x-ui.db 'VACUUM;'` > > this will vacuum the database file every day automatic. whats do this vacuum ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#749
No description provided.