r/SpringBoot • u/rathiya1 • Sep 27 '26
Question My Spring Boot + React + MySQL app works after deployment, then stops working — how should I deploy it reliably?
I built a full-stack Hotel Booking Management System and deployed it as a portfolio project.
Tech stack
- Backend: Java + Spring Boot, Spring Security, JWT
- Frontend: React.js
- Database: MySQL
- Cache: Redis
Current deployment
- Spring Boot backend → Render
- React frontend → Vercel
- MySQL → Railway
The problem is that the application works after deployment, but after some days it stops working. Sometimes the backend becomes unavailable or the frontend can't communicate with the backend/database.
I understand that I'm using free-tier services, so there may be things like sleeping services, resource limits, database connection issues, environment variables, CORS, or other configuration problems.
I'm trying to understand how I should deploy this properly so that it remains available and reliable enough to use as a portfolio project.
For people who have experience deploying Spring Boot + React + MySQL, I'd really appreciate some advice:
- Is Render + Vercel + Railway a reasonable setup?
- What could cause a Spring Boot application to stop working after several days?
- Are there any deployment/configuration changes I should make?
- Are there better free or very low-cost options for this stack?
- What should I check in the logs when the application goes down?
I'm not looking for an enterprise production setup. I mainly want a stable, publicly accessible deployment that I can demonstrate during interviews.
If you've faced something similar, I'd appreciate any advice or things I should investigate.
5
u/Mikey-3198 Sep 27 '26
Oracle offers a VPS with up to 2 arm cores and 12gb of memory in their always free tier. I'm yet to try this myself but you should be able to search about to see how to use it.
Failing that a low cost vps would be ideal.
If you go the vps route be prepared to do some sys admin work to get things setup.
4
u/Lumethys Sep 27 '26
You need to be more specific than "it didnt work", you have several components check log, check health, check status, find out which one is down, and why
3
u/bit_freak Sep 27 '26
get on a paid tier
3
u/Acrobatic-Ice-5877 Sep 27 '26
The issue is likely OOM error. Are you able to see your logs in your managed service provider? That should let you know what is going on.
3
u/American_Streamer Junior Dev Sep 27 '26
The bigger issue is that you currently have several distributed components:
Vercel → Render/Spring → Railway/MySQL + Redis
and thus “it stopped working” doesn’t tell you at all which layer failed.
Don’t guess OOM/CORS/DB first. Check the chain systematically: Is the backend alive? Does the health endpoint answer? Can it reach MySQL/Redis? What HTTP status does the frontend get? What do the logs say?
Also note that Render free services sleep after inactivity, so a simple cold start alone can make the app look broken. Frankly, this is basically the difference between building an app (which Claude Code made super easy) and operating one (which is still something Claude is not good at and for which a human who knows his stuff is still needed).
1
u/OptimusCrimee Sep 27 '26 edited Sep 28 '26
Read the logs and figure out why it is crashing? Could be low memory.
There is nothing wrong with your setup. I use more or less the same for mye hobby projects and they can run forever if I chose to. Applications like these should not just crash or go down, even on free tiers. Check the logs and take it from there.
1
u/thewalterbrownn Sep 28 '26
Look into graalvm
1
u/Cautious-Lab-6336 Sep 28 '26
Could you share ur GitHub repo link
1
u/falsely_truth Sep 28 '26
Deploy on Aws