# kctl doctor
kctl doctor to automatically detect and fix most common issues on the server.
- Open terminal.
Does it show error "kctl: command not found"?
That means, you must to upgrade the server configuration first.
Server works slow, 502 errors
- Open Terminal.
st (Stolen CPU):
If value greater than 0, that means the cloud server doesn't receive enough CPU time. You must report about that issue to the support of the cloud provider.
No enough space on the server
I increased RAM, but Keitaro don't see it.
You must upgrade server configuration.
How to understand that everything works well?
Keitaro shows yellow exclamation mark on the top if something is wrong. You may also check System Log.
Errors "Some internal error" or "See system log"
Maintenance → Logs → System log.
"RedisException: OOM command not allowed when used memory > 'maxmemory'" error
- Go to Maintenance → Settings → System
- Set a lower LP Token expire time.
Set lower uniqueness expire time in the campaigns.
Upgrade the server configuration.
Keitaro cannot refresh the license
- If you changed
/etc/resolve.conf, revert the changes.
- If you changed firewall settings, check if it allows outgoing connections.
Got error 28 from storage engine
not enough disk space.
To show disc space in a server console, use the following command:
Redis is LOADING the dataset.
That solution deletes all the unprocessed statistics, but fixes the issue fast.
Run in server terminal:
rm -rf /var/lib/redis/* service redis restart
Database is corrupted
Mostly this occurs when MySQL database of your tracker crashed because of major failure in SSD read/write error (bad blocks, I/O error, bad or defective SSD drive).
- In the terminal, run:
sudo touch /forcefsck
- Reboot the server:
- Start MySQL DB service in normal mode
service mysql start
How to free inodes usage?
If your tracker started to work incorrectly, and you see messages about low disk space (while
df -h showing you
that you have enough disk space). In such case, possible that inodes usage on your server is close to its capacity.
Inodes—are file descriptors in Linux, which store the attributes and disk block locations of the object's data.
File-system object attributes may include metadata (times of last change, access, modification), as well as owner and
permission data. When the number of inodes is close to 0 - that means your OS is insufficient of file descriptors (
In such a case, you need to delete those files. For searching inodes, you need to use the following command:
We will receive the output of the structure of your file system with a list of inodes number directly. Now you need to follow the directory with the biggest number of inodes in your system—you need to go in a directory with the biggest inodes number and look for the folder with the biggest inodes number. Finally, you will find the folder with the biggest inode count number. After that—you will need to delete this folder with the following command:
rm -rf deletedfolder/
deletedfolder/ is the name of the folder with the biggest inode number which you need to delete.
WARNING Please verify the folder which you are going to delete—your target is to delete the folder with most of
the files descriptors (or biggest inode number) BUT not system files of your OS or a server. If you are not sure what
are you doing. It is better to refer to our technical support which will help you gladly to free inodes usage on your
server. In other cases, you are risking to make your server unworkable.
Server works slowly
This could happen because of the lack of CPU resources for your virtual server. Run the command:
vmstat 1 5
As a result you'll see the following table:
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 111 0 0 3438984 20280 603200 0 0 11 20 38 85 10 2 32 0 56 139 0 0 3435676 20280 603220 0 0 0 0 936 318 15 3 0 0 82 126 0 0 3434312 20280 603212 0 0 0 0 903 198 14 4 0 0 82 92 0 0 3450964 20280 603868 0 0 0 0 885 198 13 3 0 0 83 145 1 0 3452128 20280 604412 0 0 448 0 993 254 14 2 0 0 84
Pay attention to the last column
st. If the value is more than 0, your VPS has insufficient resources. Contact the server provider in this case.
How do I check if my server has HDD or SSD?
Check the disks' names here:
# Optimizing database
service crond stop
Start Cron again:
service crond start
# Deleting all the statistics
cd /var/www/keitaro && sudo -u keitaro php bin/cli.php system:delete_all_stats --truncate-all-stats
After typing it in you will get the following warning:
[WARNING] Important! The following will happen: - old versions tables removal, - clicks stats to the exact date removal (if specified in parameters), - optimization of the clicks in the stats, - cleaning all the current stats completely (if specified in parameters). These inquiries will block the database during the implementation and require additional free space on a disk.
yes and press
ENTER to confirm.
To enable automatic data cleaning, set Stats store term in the settings.