### The Role of `TailStatic-Tools`

`TailStatic-Tools` is a specialized background service that performs the "heavy lifting" for your websites. By separating these tasks from the main application, TailStatic remains fast and responsive for dashboard users even while complex site rendering is happening in the background. See [Docker Images and Service Roles](/docs/docker-images-and-service-roles) for an architecture overview.

### Key Responsibilities

#### 1. Site Rendering
Converts your [Components and Liquid Templates](/docs/components-and-liquid-templates) and [Pages and Markdown Content](/docs/pages-and-markdown-content) into high-performance static HTML.

#### 2. Tailwind CSS Processing
Automatically compiles your Tailwind classes, purges unused styles, and generates optimized CSS files for each site.

#### 3. Asset Bundling and Minification
Combines multiple [Files, Assets, and Collections](/docs/files-assets-and-collections) into bundles to reduce the number of requests made by visitors. It also minifies HTML to decrease page load times.

#### 4. Social Image (OG) Rendering
Uses a headless browser or specialized engine to render custom [SEO Files, Sitemaps, and OG Images](/docs/seo-files-sitemaps-and-og-images) for your pages based on your site's design.

### Monitoring Job Health

You can monitor the status of processing jobs in the dashboard. Detailed records are available in [Analytics and Logs](/docs/analytics-and-logs).

* **Pending:** The job is in the queue waiting for `TailStatic-Tools` to pick it up.
* **Processing:** `TailStatic-Tools` is currently working on the job.
* **Completed:** The job finished successfully.
* **Failed:** The job encountered an error.

### Handling Job Failures

If a job fails, check the **Job Logs** for specific error messages. Common causes include:
* **Missing Assets:** A Liquid template refers to a file that does not exist in the [Site Directory Layout](/docs/site-directory-layout).
* **Syntax Errors:** A mistake in your [Custom Liquid Tags](/docs/custom-liquid-tags) or Tailwind configuration.
* **Service Unreachable:** The main TailStatic app cannot communicate with the `TailStatic-Tools` container. Check your [Docker Quickstart](/docs/docker-quickstart) settings.
* **Timeout:** A very large site might take longer to render than the allowed timeout period.

### Health Checks

TailStatic periodically performs health checks on the `TailStatic-Tools` service. You can see the current status in the [Application Settings](/docs/application-settings). If the service shows as "Offline," verify that the `tailstatic-tools` container is running and that the URL configured during the [Installation Wizard](/docs/installation-wizard) is correct.

### Next Steps

Processing jobs are triggered whenever you use [Preview Workflows](/docs/preview-workflows) or [Publish Workflows](/docs/publish-workflows). If you encounter persistent issues, consult [Troubleshooting TailStatic](/docs/troubleshooting-tailstatic). All changes to the processed files are tracked in the [Persistent Storage Layout](/docs/persistent-storage-layout).

### See Also

* [Docker Images and Service Roles](/docs/docker-images-and-service-roles)
* [Installation Wizard](/docs/installation-wizard)
* [Preview Workflows](/docs/preview-workflows)
* [Troubleshooting TailStatic](/docs/troubleshooting-tailstatic)
