惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
I
InfoQ
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
美团技术团队
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
Jina AI
Jina AI
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
Last Week in AI
Last Week in AI
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
L
LangChain Blog
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
G
Google Developers Blog
博客园 - 叶小钗
博客园 - Franky

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Keep Your Render Free-Tier App Alive (Without Payi...
Hassan Yosuf · 2026-06-14 · via DEV Community

If you've ever deployed a side project on Render's free tier, you've probably run into the same frustrating experience: you share the link with someone, they click it, and then... nothing happens for 30–60 seconds while the app wakes up from its sleep.

This is because Render spins down free-tier web services after 15 minutes of inactivity. The next request has to cold-boot the entire application before it can respond. For a Spring Boot app like my project ChatUp — a real-time WebSocket chat app with Groq AI — that delay kills the first impression entirely.

The good news: you can work around it for free, with very little effort.


Why Render Does This

Render's free plan is genuinely generous — you get a live HTTPS URL, automatic deploys from GitHub, and no credit card required. The trade-off is that idle services are paused to conserve resources. The moment your service receives a request while sleeping, Render queues the request and starts the container. Depending on your stack, that spin-up can take anywhere from 10 seconds (lightweight Node.js) to over a minute (Spring Boot with a full application context).

The fix is simple: don't let it sleep in the first place. Send a request to your app every 10 minutes or so, and Render will never spin it down.

Here are three ways to do that.


Approach 1: Cron-job.org (Easiest — Zero Code)

Cron-job.org is a free service that lets you schedule HTTP requests on a cron schedule, no account upgrade required.

Steps:

  1. Sign up at cron-job.org (free)
  2. Click Create cronjob
  3. Set the URL to your Render app (e.g. https://your-app.onrender.com)
  4. Set the execution schedule to every 10 minutes
  5. Save and enable it

That's it. The dashboard shows you a log of every execution, so you can verify your app is returning 200 OK. If it's returning errors, you'll know immediately.

Best for: Anyone who wants this solved in under 5 minutes with no code.


Approach 2: GitHub Actions Cron Job (Developer-Native)

If your project is already on GitHub, you can add a workflow that pings your app on a schedule. This keeps everything in one place and doesn't require a third-party account.

Create .github/workflows/keep-alive.yml in your repo:

name: Keep Alive

on:
  schedule:
    - cron: '*/10 * * * *'  # every 10 minutes

jobs:
  ping:
    runs-on: ubuntu-latest
    steps:
      - name: Ping Render App
        run: curl -s https://your-app.onrender.com/ > /dev/null

Push it to your default branch and GitHub Actions will handle the rest. You can verify it's running under the Actions tab in your repository.

Caveat: GitHub Actions has a known behaviour where scheduled workflows on repos with no recent activity may be paused after 60 days. You can re-enable them manually, or commit something small to reset the timer.

Best for: Developers who prefer keeping infrastructure-as-code in their repo.


Approach 3: Self-Ping Inside the Application (Spring Boot)

For Spring Boot apps specifically, you can add a scheduled task that pings the app's own health endpoint. This requires no external service.

First, enable scheduling in your main class or a config class:

@SpringBootApplication
@EnableScheduling
public class ChatUpApplication {
    public static void main(String[] args) {
        SpringApplication.run(ChatUpApplication.class, args);
    }
}

Then add a scheduler component:

@Component
public class KeepAliveScheduler {

    private static final Logger log = LoggerFactory.getLogger(KeepAliveScheduler.class);

    @Value("${app.base-url}")
    private String baseUrl;

    @Scheduled(fixedRate = 600_000) // every 10 minutes
    public void keepAlive() {
        try {
            HttpURLConnection connection = (HttpURLConnection)
                new URL(baseUrl + "/actuator/health").openConnection();
            connection.setConnectTimeout(5000);
            connection.connect();
            log.info("Keep-alive ping sent. Response: {}", connection.getResponseCode());
        } catch (Exception e) {
            log.warn("Keep-alive ping failed: {}", e.getMessage());
        }
    }
}

Set app.base-url=https://your-app.onrender.com in your application.properties.

Important caveat: This approach has a fundamental weakness — if the app is already asleep, it cannot ping itself to wake up. It only helps prevent the app from sleeping in the first place, which means if Render does spin it down (e.g., after a redeploy or a brief outage), the self-ping won't kick in until the app is already running again. Use this as a supplement to one of the external approaches above, not as a replacement.

Best for: Adding a redundant keep-alive layer on top of an external pinger.


Which Approach Should You Use?

Approach Setup Time Requires Code Works if App is Down? Best For
Cron-job.org ~3 min No Yes Quickest setup
GitHub Actions ~5 min Yes (YAML) Yes Keeping it in the repo
Spring Boot self-ping ~10 min Yes (Java) No Extra redundancy layer

For my ChatUp app, I went with cron-job.org — it took about two minutes and the app has been instantly responsive ever since. If you want belt-and-suspenders reliability, combine cron-job.org with the GitHub Actions workflow for redundancy.


A Note on Render Paid Plans

If your app gets real traffic and the free tier becomes a limitation, Render's Starter plan ($7/month per service) removes the spin-down behaviour entirely. For a production app, that's worth it. But for side projects and demos, the approaches above keep things running without spending a dime.


Wrapping Up

Render's free tier is a fantastic way to get a project live quickly. The spin-down behaviour is the one real friction point, but as you've seen, it's easy to work around. Pick whichever approach matches your setup and you'll never have to apologise for a slow first load again.

If you want to check out the project this post came from, ChatUp is live at chatup-jg85.onrender.com and the source is on GitHub.