Troubleshooting Guide
Common issues and solutions for Material Kai Vision Platform.
🔴 Critical Issues
API Service Down
Symptoms:
- 502 Bad Gateway errors
- Connection refused
- Timeout errors
Solutions:
Restart service
Check disk space
Check memory
Check database connection
Database Connection Failed
Symptoms:
- "Connection refused" errors
- Timeout on queries
- "Too many connections"
Solutions:
Increase connection pool
Kill idle connections
Restart database
- Use Supabase dashboard
- Or SSH and restart PostgreSQL
Out of Memory (OOM)
Symptoms:
- Process killed
- "Cannot allocate memory"
- Slow performance
Solutions:
Increase server memory
Optimize batch size
Clear cache
Restart service
🟡 Common Issues
PDF Processing Fails
Symptoms:
- Job stuck at certain stage
- Error in logs
- Timeout
Solutions:
Stage 0 (Product Discovery)
- Check PDF format
- Verify file size < 100MB
- Check AI API keys
Stage 2 (Text Extraction)
- Verify PDF is readable
- Check for corrupted pages
- Try different extraction method
Stage 6 (Image Analysis)
- Check image count
- Verify image quality
- Check HuggingFace Endpoint quota (Qwen3-VL)
Resume from checkpoint
Search Returns No Results
Symptoms:
- Empty search results
- Low relevance scores
- Timeout on search
Solutions:
Verify embeddings generated
Rebuild indexes
Check query embedding
Adjust similarity threshold
High Latency
Symptoms:
- Slow API responses
- Timeout errors
- Poor user experience
Solutions:
Optimize queries
Enable query caching
Scale horizontally
- Add more API instances
- Use load balancer
Optimize embeddings
- Use smaller dimension
- Cache results
Authentication Failures
Symptoms:
- 401 Unauthorized
- 403 Forbidden
- JWT token errors
Solutions:
Verify token not expired
Refresh token
Check API key
Verify workspace access
Image Analysis Fails
Symptoms:
- "Image analysis failed"
- HuggingFace Endpoint (Qwen3-VL) API errors
- Quality score 0
Solutions:
Verify image format
- Supported: PNG, JPG, WEBP
- Size: < 10MB
- Resolution: > 100x100px
Check HuggingFace Endpoint quota
- Verify
QWEN_ENDPOINT_TOKEN is set
- Check endpoint is not paused (auto-pause enabled)
- Check account credits on HuggingFace
Retry with different image
🟢 Performance Optimization
Slow Embeddings Generation
Solutions:
Batch embeddings
Use smaller model
Cache results
Slow Search Queries
Solutions:
Add indexes
Limit results
Use vector search (faster)
High Database Load
Solutions:
Enable connection pooling
Optimize queries
- Use EXPLAIN ANALYZE
- Add indexes
- Denormalize if needed
Archive old data
📞 Support Resources
Documentation:
- API Reference:
/docs
- ReDoc:
/redoc
- OpenAPI Schema:
/openapi.json
Monitoring:
Contact:
Last Updated: October 31, 2025
Version: 1.0.0
Status: Production