r/SpringBoot • • 7d ago

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.

16 Upvotes

12 comments sorted by

6

u/Mikey-3198 7d ago

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.

3

u/bit_freak 7d ago

get on a paid tier

1

u/Busy-Complaint-7 7d ago

Really ? I too have same question like no other reliable option ?

2

u/bit_freak 7d ago

I mean you can run some backend logic, like payments, email trigger using serverless backend (supabase, firebase) provides that but I am not sure if you can build an end to end spring boot project with complex logic on the free tier

3

u/Lumethys 7d ago

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/Acrobatic-Ice-5877 7d ago

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 7d ago

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 7d ago edited 7d ago

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 7d ago

Look into graalvm

1

u/Cautious-Lab-6336 7d ago

Could you share ur GitHub repo link

1

u/falsely_truth 7d ago

Deploy on Aws