Keitaro TDS is working weirdly. How can I find the reason?

  • Go to Service > Status page. Find the error log and check if there are errors.
  • Check php error log /var/log/errors.log (path froom Keitaro root);

Some descriptions of errors you'll find bellow. Also, you can contact us

Authentication fails, "Authentication blocked" error displayed

It was admin panel brute-force attack protection. Delete the file /var/auth/store.dat to release lock.

Cannot get licenses, the connection to the servers fails

Here are some reasons:

  1. Nameserver, that set in /etc/resolve.conf, is not available;
  2. Firewall is configured so that it blocks all outbound connections;
  3. The server is not available.

The solution for hostings:

The solution for servers:

1. Open in your browser. If the website is not available email us at 2. If you have shared hosting contact the hosting support team and ask them “Why the connection to the is blocked?”. 2. If you have your own server, send a ping to from the server console.


If there is an error “Unknown host” check which ns-servers are contained in the file /etc/resolve.conf of the server. You can add there DNS from Google;


If you still have an “Unknown host” error write at /etc/hosts

If there is an error “Timed out” check your firewall settings. Contact a hosting support team if necessary.

"Sorry, Please create .../var/cache/*** and SET Mode 0777 or any Writable Permission!"

These messages appear when cron is executed funder root or other username. Setup the cron to the user under whose name domain is functioning. Delete the content in /var/cache and set 777 attributes.

"Server connection failed. Impossible to get the license"

Check if opens on your computer. If it does:

  • Check your firewall settings;
  • Ping from the server;
  • Check the status of DNS servers registered in /etc/resolve.conf of the server;
  • Download the script test.php. Upload it to TDS directory and open in your browser.

...visitors.processing.dat exists (resuming) Fatal error: Allowed memory size of nnn bytes exhausted

The reason is that php is not enough memory to upload stored data in the database.

Possible solutions:

  1. Use the storage in Redis
  2. Increase the memory in php.ini. The directive memory_limit.

"The encoded file index.php cannot be run because the php.ini setting auto_prepend_file or auto_append_file is in use."

Open .htaccess file and uncomment the lines:

#php_value auto_prepend_file none
#php_value auto_append_file none

Save and set 444 attributtes. Then the file will not be erased after TDS update.

"Warning: touch(): Unable to create file /admin/..//var/cron/partitioning.lock because Permission denied"

Set 777 attributes for var/ directory and all the contents.

"Сannot be processed because an untrusted PHP zend engine extension is installed"

Turn off eAccelerator.

"Connection attempt failed: SQLSTATE[08004] [1040] Too many connections"

The maximum limit of connections set in MySQL configuration is exceeded. Increase the max_connections value in /etc/my.cnf and reload MySQL.

"Connection attempt failed: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket"

Database cannot stand the load. Go to Keitaro TDS settings, find the option “Traffic processor storage” in “Performance” tab and choose “Files” or “Redis”.

"Got error 28 from storage engine"

It means “not enough disk space”.

To show disc space in server console, use command below

$ df -h

"Error while connecting redis: Redis server went away"

For hostings

  1. Open the page Maintenance > Settings > Performance.
  2. Set “Files” at the “Storage for draft data” option.

For servers

1. Check if Redis is running:

$ service redis status

2. If it is stopped run it

$ service redis start

3. Add to autoload (CentOS)

$ chkconfig redis on

Test Redis by this script:

$redis = new Redis();
$redis->connect('', 6379);

"Warning fopen(FILENAME): failed to open stream: Permissions denied"

Set attributes 775 or 777 to files which contain error.

"1286: Unknown storage engine 'InnoDB'"

For hostings Contact a hoster support team to help resolve this error.

For owners of the servers Add in my.cnf:


and reboot MySQL:

service mysql restart

"Got error -1 from storage engine"

Open the MySQL configuration file my.cnf (at /etc/my.cnf or /etc/mysql/my.cnf). Replace the directive value:

innodb_force_recovery = 0

Restart MySQL

service mysql restart

Warning: session_start(): open(/tmp/sess_eruq40a3agi2a858ekbuhd7750, O_RDWR) failed: Permission denied (13) in /.../lib/Keitaro/Session.php on line 0

The error says that you do not have rights to create session in the directory sessions. Change the path for storing sessions in the directive session.save_path (php.ini) or increase attributes for the current directory.

Data is not stored in Redis

Try to clear Redis: redis-cli -r FLUSHALL

If it helped you, check the memory limit at the Redis configuration.

Countries of all streams with Sypex database are not defined

Check if there is in the php configuration mbstring.func_overload = 2. If it is there change it to mbstring.func_overload = 0

Sometimes TDS shows an Internal Error or a blank screen

Check whether the module “xcache” is connected. There are many cases of incompatibility with ioncube. Disable this module, if possible.

PHP Warning: unpack(): Type L: not enough input, need 4, have 0

Add in php.ini this code:


It is possible that php-cli has its own php.ini. Add this code in it also.

After making changes, restart the web server (apache, php-fpm).

MySQL server has gone away (with Vesta)

Open the MySQL configuration file /etc/my.cnf. Comment out the line


and restart MySQL.

service mysqld restart

MySQL server has gone away (without Vesta)

1. Make sure that the “MySQL” is not selected in the settings of the storage.

2. If you have not installed Redis, it is not recommended to check for the uniqueness by IP at the campaigns.

3. If the server has less than 1GB memory, OOMKiller can be activated. OOMKiller is a system utility that kills processes when the system gets low on memory. You can create a swap-file that can helps.

Define which web-server is installed.


Check if mod_rewrite extension is on, and there is the following directive in domain settings (httpd.conf):

AllowOverride All


Open the domain configuration in nginx (/etc/nginx/nginx.conf or in /etc/nginx/vhosts/). Find the “location / {…}” section and add:

try_files $uri $uri/ /index.php?$args;

Unable to save the updated license

Check the available free space. For example, using the console:

df -h

You will see something like this result:

Filesystem      Size   Used  Avail Capacity   iused    ifree %iused  Mounted on
/dev/disk1     465Gi  407Gi   57Gi    88% 106779354 15058244   88%   /

The penultimate column shows the percentage of used space.

Check the user quota:

quota -u USERNAME

055: Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column...

Edit the file /etc/my.cnf and replace the value:


Restart MySQL.

User 'xxx' has exceeded the 'max_connections_per_hour'

The user has the limit number of connections per hour.


1. Remove or increase the limit


2. Switch the handler storage to Files or Redis (Maintenance > Settings > Performance).

1054: Unknown column 'conversions' in 'field list'

Open the page “Maintenance > Migrations” and run the migration 95.

Models\Stream #X not found

Use phpMyAdmin to run this command:

DELETE FROM keitaro_triggers WHERE stream_id NOT IN (SELECT id FROM keitaro_streams)

Extension php_redis not installed!

Open the page “Settings”. Switch the cache and data storage on the “Files”.

How to get rid of the IP-addresses

Disable IPv6 on the server. This will cause all users to connect to a server by IPv4.

In CentOS edit the file /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then run:

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

Error 504 when unloading report

You need to increase timeouts.

If PHP-FPM is used, add the instruction fastcgi_read_timeout N;:

location ~ \.php$ {
  fastcgi_pass unix:/tmp/php5-fpm.sock;
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  include fastcgi_params;

  fastcgi_read_timeout 300;      # <----

In the case of Apache, you need to increase the proxy time:

server {
    proxy_connect_timeout       600;
    proxy_send_timeout          600;
    proxy_read_timeout          600;
    send_timeout                600;
    client_header_timeout  600;
    client_body_timeout    600;

For both cases you can increase the external timeouts:

server {
    send_timeout                600;
    client_header_timeout  600;
    client_body_timeout    600;

Restart Nginx

service nginx reload

igbinary_unserialize_header: unsupported version: 726750533, should be 1 or 2

You need to disable igbinary module in php.

The configuration files can be found in such a way:

php --ini | grep ini

PHP-FPM 7.0 is installed and it takes up the entire server memory

PHP 7.0 has a problem with a memory leak. You need to correct config of PHP-FPM.

Switching to ondemand will cause the PHP-FPM create processes adaptively the load:

pm = ondemand

Uncomment these options will allow PHP-FPM self-cleaning:

pm.process_idle_timeout = 10s
pm.max_requests = 500