Troubleshooting
Common issues and how to fix them.
Bot won't start
Check the logs
cd WZML-X
docker compose logs --tail 50Common causes
Missing required config:
ERROR - BOT_TOKEN is required!Make sure all 5 required values are set: BOT_TOKEN, OWNER_ID, TELEGRAM_API, TELEGRAM_HASH, DATABASE_URL.
Wrong config format: This is a Python file, not .env. Check your syntax:
- Strings need quotes:
BOT_TOKEN = "123:abc" - Numbers don't:
OWNER_ID = 123456789 - Booleans capitalize no quotes:
Truenot"True"
MongoDB can't connect:
ERROR - Can't connect to MongoDBCheck:
- Your
DATABASE_URLis correct - Network Access allows
0.0.0.0/0 - Username and password are correct in the URL
Port already in use:
Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in useSomething else is using port 80. Stop the other service or change ports.
Bot runs but doesn't respond
Check if the bot is online
docker compose psBoth app and tunnel should show Up.
Check the logs
docker compose logs app --tail 20Bot started but no response to commands?
The bot uses Cloudflare tunnel. Sometimes the tunnel fails:
docker compose logs tunnelIf you see errors, restart:
docker compose restart"No such command" or bot doesn't recognize commands
The bot sets commands automatically if SET_COMMANDS = True (default).
If commands aren't showing up:
- Restart the bot:
/restart - Or manually set commands: send
/botsetand look for Set Commands option
Downloads stuck at 0%
Torrents
- Check if the torrent has seeders
- qBittorrent settings may need tuning in
/botset→ Qbit Settings
Direct links
- The link might require authentication (use
-auand-ap) - The site might block automated downloads
- Try with premium services (Real-Debrid, Debrid-Link)
YouTube / Social media
- YouTube might be rate-limiting. Wait and try again.
- Some sites require cookies. Upload
cookies.txtvia/botset→ Private Files
Google Drive errors
Quota exceeded
User rate limit exceededSolutions:
- Enable Service Accounts:
USE_SERVICE_ACCOUNTS = True - Generate service accounts:
python3 gen_sa_accounts.py - Upload
accounts.zipvia/botset→ Private Files
"token.pickle not found"
ERROR - token.pickle not foundGenerate it:
python3 generate_drive_token.pyThen upload the token.pickle file via /botset → Private Files.
File already exists
If STOP_DUPLICATE = True, the bot won't re-upload existing files. Either:
- Disable it:
STOP_DUPLICATE = False - Or delete the old file first
Uploads fail
Telegram upload limit
Telegram limits:
- Normal bot: 50MB files
- Premium bot: 2GB files (bot needs active Premium)
- User account: 2GB files
If your file is larger, it gets split. Set LEECH_SPLIT_SIZE to control the split size.
"File too large for Telegram"
The file exceeds the upload limit AND splitting is disabled. Either:
- Enable splitting (check
LEECH_SPLIT_SIZEis set) - Upload to cloud instead (use
/mirrorinstead of/leech)
Web UI not loading
Check the tunnel
docker compose logs tunnelLook for https://*.trycloudflare.com. If it's not there, restart:
docker compose restart tunnelPincode not working
If WEB_PINCODE = True, you need a pincode to access the web UI:
- Send any command with
-sto the bot - The bot replies with a pincode
- Enter it on the web page
RSS feeds not working
Check the feed URL
Make sure the URL is valid. Test it in a browser first.
No new items being downloaded
- Check filters:
-infand-exfmight be too strict - Check
RSS_DELAY— default is 600 seconds (10 minutes). It might take time.
"Invalid RSS URL"
Some RSS feeds require cookies. Upload cookies.txt via /botset → Private Files.
Bot is slow
Check server resources
docker compose exec app htopOr:
docker compose exec app free -h
docker compose exec app df -hTune the queue
QUEUE_ALL = 2
QUEUE_DOWNLOAD = 2
QUEUE_UPLOAD = 1Lower numbers = less strain on the server.
Tune qBittorrent
In /botset → Qbit Settings, adjust AsyncIOThreadsCount:
- 4-8 threads for 2-4 CPU cores
- 8-16 threads for 4-8 CPU cores
Bot crashes / restarts repeatedly
Check for OOM (Out of Memory)
docker compose logs app | grep -i "killed\|oom\|memory"If the bot is killed due to memory, increase server RAM or limit concurrent tasks.
Get the log file
/logThis sends you the bot's log. It contains detailed error information.
Common crash causes
- Disk full — Clear old downloads:
docker compose exec app rm -rf downloads/* - Memory full — Lower
QUEUE_ALLlimits - Config error — Check
config.pyfor syntax errors
Can't connect to MongoDB
- Check the URL format:
mongodb+srv://user:password@cluster.mongodb.net/... - Make sure Network Access allows
0.0.0.0/0 - Make sure Database Access user has read/write permissions
- Test the connection from your server:
docker compose exec app python3 -c "from pymongo import MongoClient; MongoClient('YOUR_URL').server_info()"Permission errors (token.pickle, accounts, etc.)
Most file operations happen inside the Docker container. Upload files via /botset → Private Files instead of copying manually.
If you must copy manually:
docker cp token.pickle WZML-X-app-1:/usr/src/app/token.pickleRestart the bot
/restartOr from the server:
docker compose restartFor a full rebuild:
docker compose down && docker compose up -dStill stuck?
Join the support group: https://t.me/WZML_Support
Provide:
- The error message
- Bot logs (
/log) - What you were trying to do