Troubleshooting

This guide helps you diagnose and resolve common issues with PTIIKInsight. Issues are organized by category with step-by-step solutions.

Quick Diagnostics

System Health Check

Run this comprehensive health check to identify common issues:

# Check all services
curl http://localhost:8000/health

# Check specific components
docker-compose ps
docker-compose logs --tail=50

Common Symptoms and Quick Fixes

Symptom
Quick Fix

Dashboard not loading

Check port 8501, restart dashboard service

API not responding

Check port 8000, verify database connection

Model training fails

Check memory usage, verify data format

Slow performance

Check resource usage, optimize parameters

Empty topics

Adjust min_topic_size parameter

Installation Issues

Docker Issues

Docker Compose Fails to Start

Symptoms:

  • Services exit immediately

  • Port binding errors

  • Volume mount issues

Solutions:

Out of Memory Errors

Symptoms:

  • Container exits with code 137

  • "Killed" messages in logs

Solutions:

Network Connectivity Issues

Symptoms:

  • Services can't communicate

  • Database connection errors

Solutions:

Manual Installation Issues

Python Dependencies

Symptoms:

  • Package installation fails

  • Import errors

  • Version conflicts

Solutions:

Database Issues

Symptoms:

  • Connection refused

  • Authentication failed

  • Database doesn't exist

Solutions:

Runtime Issues

API Issues

API Not Responding

Symptoms:

  • Connection timeout

  • 502 Bad Gateway

  • Service unavailable

Diagnostics:

Solutions:

Database Connection Errors

Symptoms:

  • "Connection to database failed"

  • "Connection pool exhausted"

  • Timeout errors

Solutions:

Redis Connection Issues

Symptoms:

  • Cache not working

  • Session errors

  • Connection refused

Solutions:

Dashboard Issues

Dashboard Won't Load

Symptoms:

  • Blank page

  • Connection error

  • Python errors

Diagnostics:

Solutions:

Slow Dashboard Performance

Symptoms:

  • Long loading times

  • Unresponsive interface

  • Timeout errors

Solutions:

Model Training Issues

Training Failures

Out of Memory During Training

Symptoms:

  • Training stops unexpectedly

  • "CUDA out of memory" errors

  • System becomes unresponsive

Solutions:

Poor Topic Quality

Symptoms:

  • Topics don't make sense

  • Too many similar topics

  • Keywords are not relevant

Solutions:

Training Never Completes

Symptoms:

  • Training stuck at certain percentage

  • No progress for extended time

  • Memory usage constantly high

Solutions:

Model Performance Issues

Slow Inference

Symptoms:

  • Topic prediction takes long time

  • API timeouts

  • High CPU usage

Solutions:

High Memory Usage

Symptoms:

  • System slow after training

  • Memory not released

  • Swap usage high

Solutions:

Data Issues

Data Loading Problems

File Upload Failures

Symptoms:

  • Upload times out

  • File format errors

  • Encoding issues

Solutions:

Data Preprocessing Errors

Symptoms:

  • Text cleaning fails

  • Language detection errors

  • Empty documents after processing

Solutions:

Data Quality Issues

Inconsistent Results

Symptoms:

  • Topics change between runs

  • Inconsistent document assignments

  • Varying quality scores

Solutions:

Performance Issues

System Performance

High CPU Usage

Symptoms:

  • System sluggish

  • High load average

  • Processes not responding

Solutions:

High Memory Usage

Symptoms:

  • System using swap

  • Out of memory errors

  • Slow response times

Solutions:

Disk Space Issues

Symptoms:

  • Disk full errors

  • Slow I/O operations

  • Log files growing large

Solutions:

Monitoring and Logging

Log Analysis

Finding Relevant Logs

Common Log Patterns

Monitoring Setup

Basic Monitoring

Advanced Monitoring

Frequently Asked Questions

General Questions

Q: Why is my training taking so long? A: Training time depends on dataset size, model complexity, and hardware. Try reducing dataset size, using a faster embedding model, or increasing hardware resources.

Q: Can I use PTIIKInsight with other languages? A: Yes, use multilingual embedding models like paraphrase-multilingual-MiniLM-L12-v2 and set the appropriate language in preprocessing settings.

Q: How do I improve topic quality? A: Adjust min_topic_size, use better embedding models, improve data preprocessing, and ensure sufficient data volume.

Technical Questions

Q: Can I run PTIIKInsight on Windows? A: Yes, using Docker Desktop or WSL2. Native Windows installation is possible but Docker is recommended.

Q: How much memory do I need? A: Minimum 8GB RAM, but 16GB+ recommended for production use. Memory usage scales with dataset size.

Q: Can I use GPU acceleration? A: Yes, configure GPU support in Docker and set USE_GPU=true in environment variables.

Configuration Questions

Q: How do I change the default ports? A: Edit the .env file to change API_PORT and DASHBOARD_PORT values.

Q: Can I use external databases? A: Yes, configure DATABASE_URL and REDIS_URL to point to external services.

Q: How do I backup my data? A: Use docker-compose exec db pg_dump for database backups and backup the ./data directory.

Getting Additional Help

Community Support

  • GitHub Issues: Report bugs and request features

  • Discord Server: Join the community chat

  • Stack Overflow: Tag questions with ptiikinsight

Professional Support

  • Documentation: Comprehensive guides and tutorials

  • Consulting: Professional implementation support

  • Training: Workshops and training sessions

Reporting Issues

When reporting issues, include:

  1. System information: OS, Docker version, memory

  2. Configuration: .env file (without secrets)

  3. Error logs: Relevant log excerpts

  4. Steps to reproduce: Clear reproduction steps

  5. Expected vs actual behavior: What you expected vs what happened

Contributing

Help improve PTIIKInsight:

  • Report bugs and issues

  • Suggest new features

  • Contribute code improvements

  • Improve documentation

  • Share usage examples


Last updated