docs: Document gateway port collision prevention features#459
Conversation
- Add praisonai gateway stop command with --force option - Document GATEWAY_PORT environment variable - Add single-instance enforcement with PID locks - Update status output examples with lock/port info - Add port collision and silent bot troubleshooting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
More reviews will be available in 39 minutes and 16 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation across several files to explain the new single-instance enforcement mechanism for the PraisonAI gateway, which uses PID locks to prevent port conflicts. It introduces documentation for the praisonai gateway stop command, the GATEWAY_PORT environment variable, and provides troubleshooting guides for handling port conflicts and silent Telegram bots. The review feedback suggests correcting the PID lock file placeholders in docs/features/gateway.mdx to use <safe_host> instead of <host> for accuracy, and fixing an incorrectly labeled Windows command (netstat -ano | findstr) that was described as a Linux alternative in the troubleshooting guide.
| class Error,Stop error | ||
| ``` | ||
|
|
||
| **PID Lock File:** `~/.praisonai/gateway-<host>-<port>.pid` |
There was a problem hiding this comment.
| </Accordion> | ||
|
|
||
| <Accordion title="Single instance per bot token"> | ||
| Each Telegram/Discord/Slack bot token must be polled by exactly one process. PraisonAI enforces a PID lock at `~/.praisonai/gateway-<host>-<port>.pid` — start a second instance and you'll get a clear error pointing at the running PID. Use `GATEWAY_PORT=<other>` to run a second gateway on another port. |
| # Linux alternative: | ||
| netstat -ano | findstr :8765 |
There was a problem hiding this comment.
Fixes #450
This PR documents the new gateway port collision prevention features added in PraisonAI PR #1756:
Changes Made
docs/features/gateway-cli.mdx
docs/features/gateway.mdx
docs/guides/troubleshoot-gateway.mdx
Technical Details Documented
Generated with Claude Code