Hope everyone doing great.!!
Few days back all my extracts published on Tableau server starts failing, most of them are on 15 min refresh schedule. While looking for the root cause, i found that there is no enough disk space in the system where Tableau server is installed. (You can see this from Status -> Background Tasks for Extracts.)
So that is the major issue, as this is my production environment and this issue need to be diagnosed immediately and we have to make sure this will not occur in future as well.
So, today I’ll describe here how to deal with such kind of issues. So before proceeding, i’ll explain you the possible reason why this space is keep filling regularly or what happens in the background. Below are some reasons which causes space issues :-
- The http_requests table contains records of every http request that comes in through the gateway, so it can grow significantly if you do not regularly clean it as part of your database maintenance. If the table gets too large it can impact performance and cause disk space issues.
- If we have scheduled our extract refresh, so in this scenerio, initally when we publish extract to server, .tde file is being saved in tableau server at C:\ProgramData\Tableau\Tableau Server\data\tabsvc\dataengine\extract. So, every time when the refresh happen, it will create a new .tde file and now workbook points to the newer one and if fails, points back to previous file. So older files still exist there on tableau server which consumes a lot of space.
- Logs created for every refresh with its status and other details. you can find it at
- Insider a “backgrounder*.log” file in the C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Logs folder
- In a “backgrounder*.log” file in C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\backgrounder
- and many more
So, if cleanup activity were not happen on timely basis then the issues like Disk space is full, No enough space might occur.
Now, the question is How to cleanup this?
Follow below steps to cleanup your Tableau server.
- tabadmin stop
- tabadmin ziplogs
- tabadmin cleanup
- tabadmin start
- tabadmin warmup
- tabadmin backup
To see more about tabadmin :- http://onlinehelp.tableau.com/current/server/en-us/reconfig_tabadmin.htm
Note: -You should only run tabadmin on the primary Tableau Server node, not on worker nodes.
Let’s see each steps in detail.
Step 1:- tabadmin stop – This step is very necessary when we have to make any configuration changes, better to stop tableau server so due to those changes there should not be an impact on any services.
know more :- Stop command
Step 2:- tabadmin ziplogs- This step will create an archive zip file which contain Tableau server log files
Step 3:- tabadmin cleanup- This step will Reduces the disk space consumed by Tableau Server. It removes log files, temporary files, and rows older than seven days from the http_requests table of the Tableau Server PostgreSQL database.
When you run
tabadmin cleanup with Tableau Server stopped:
- All log files are removed from
ProgramData\Tableau\Tableau Server\data\tabsvc\logs. (Log files from
ProgramData\Tableau\Tableau Server\logsare not removed.)
- Temporary files are removed from
- No rows for HTTP requests are removed from the
http_requeststable of the Tableau Server PostgreSQL database, because the database is not accessible when the server is stopped.
When you run
tabadmin cleanup with Tableau Server running:
- Log files older than the log file rotation interval are removed from
ProgramData\Tableau\Tableau Server\data\tabsvc\logs. The rotation interval is one day. Active logs and log files from
ProgramData\Tableau\Tableau Server\logsare not removed.
- Temporary files are not removed.
- Files that are in use (that is, locked by the operating system) are not removed.
- Rows for HTTP requests that are older than seven days are removed from the
http_requeststable of the Tableau Server PostgreSQL database.
Step 4:- tabadmin start- This step will start all Tableau server processes and services.
know more:- start command
Step 5:- tabadmin warmup- This step warmup Tableau Server by requesting a lightweight viz from each vizql process.
know more:- warmup command
Step 5:- tabadmin backup- This step creates a backup of the data managed by Tableau Server. This data includes Tableau’s own PostgreSQL database, which contains workbook and user metadata, data extract (.tde) files, and configuration data.
NOTE:- The command adds the .tsbak extension to the file name that you specify unless the name already contains that extension.
Above steps will cleanup your Tableau server.
Also, you can automate this whole process using Windows Scheduler. You could create a *.bat file (can be done in notepad and saved as .bat) with the following:
cd “C:\Program Files\Tableau\Tableau Server\10.1\bin” (Replace this with the location of your \bin folder on your version of Tableau Server)
This is for doing a cleanup while the server is not running so it might affect up-time. If you wish to do a cleanup with server in running mode just use the cleanup command(tabadmin cleanup).
Thanks for reading this, I hope this will be useful to you.
Love to hear your feedback, query if any.
Don’t forget to subscribe for more upcoming Thought articles.