Skip to content

feat(server): add keep-alive ping to prevent PaaS services from sleeping#2

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1777880427-add-keep-alive-ping
Open

feat(server): add keep-alive ping to prevent PaaS services from sleeping#2
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1777880427-add-keep-alive-ping

Conversation

@devin-ai-integration
Copy link
Copy Markdown

📋 Description

Adds a configurable keep-alive ping mechanism that periodically hits URLs to prevent PaaS free-tier services (Render, Railway, etc.) from going idle/sleeping.

When enabled, the server will:

  1. Ping its own SERVER_URL automatically
  2. Ping any additional URLs listed in KEEP_ALIVE_URLS (e.g. a BotWave deployment)

Configuration (env vars)

Variable Default Description
KEEP_ALIVE_ENABLED false Enable/disable keep-alive pings
KEEP_ALIVE_INTERVAL 10 Ping interval in minutes
KEEP_ALIVE_URLS (empty) Comma-separated external URLs to ping

Example usage on Render

KEEP_ALIVE_ENABLED=true
KEEP_ALIVE_INTERVAL=10
KEEP_ALIVE_URLS=https://your-botwave-app.onrender.com
SERVER_URL=https://your-evolution-api.onrender.com

🧪 Type of Change

  • ✨ New feature (non-breaking change which adds functionality)

🧪 Testing

  • Manual testing completed
  • TypeScript compilation passes (tsc --noEmit)
  • ESLint passes (npm run lint:check)
  • No breaking changes introduced — disabled by default

✅ Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have manually tested my changes thoroughly
  • I have verified the changes work with different scenarios
  • Any dependent changes have been merged and published

Link to Devin session: https://app.devin.ai/sessions/812442be799c4cd59ca9c40eee75263b
Requested by: @eksucampusmarketplace-cell

Adds configurable keep-alive pings that periodically hit URLs to prevent
Render, Railway, and other PaaS free-tier services from going idle.

Configuration:
- KEEP_ALIVE_ENABLED: enable/disable (default: false)
- KEEP_ALIVE_INTERVAL: ping interval in minutes (default: 10)
- KEEP_ALIVE_URLS: comma-separated external URLs to ping (e.g. BotWave)
- SERVER_URL is always included automatically when enabled

Co-Authored-By: Chris Tolu <eksucampusmarketplace@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant