# Autoscale deployment failing - healthcheck probing wrong port (1104)

**URL:** https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492
**Category:** Bugs
**Created:** [February 25, 2026, 9:34pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492 "2026-02-25T21:34:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 9:34pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/1 "2026-02-25T21:34:35Z")

</div>

My app (Python/Flask/Gunicorn) has been failing to deploy for 24+ hours. The healthcheck keeps trying port 1104, which I never configured. My .replit has no [[ports]] section, app binds to $PORT correctly, /health returns 200. This was deploying fine before. Support ticket [WER9G4-4JXLP] was escalated but no response yet. My app needs updates and I’m totally stuck.

Has anyone gotten around this? seems like a replit infra issue?? thank you

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 9:42pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/2 "2026-02-25T21:42:36Z")

</div>

I found this in my deployment logs: forwarding local port 5000 to external port 80 (mapped as 1104). This came from the old [[ports]] section which has since  
been removed. It appears Replit’s deployment has cached this stale port mapping. I’ve asked if engineering clear/reprovision the deployment to flush this cached config. I am getting no replies tho. this has not been a fun 24 hours.

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 10:04pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/4 "2026-02-25T22:04:59Z")

</div>

thanks so much! hoping to hear back. Its frustrating to have support just go silent . Quinn is so responsive at the start but on escalation it goes dead

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 10:12pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/5 "2026-02-25T22:12:12Z")

</div>

i just logged a new fresh ticket with what action is required in the hope support can help and not wait for escalation. ☹

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 10:57pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/7 "2026-02-25T22:57:18Z")

</div>

ok so I remixed to a brand new repl and the same port 1104 error occurs,  
proving this is a platform-level issue, not a cached config problem. (i think )

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 11:19pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/9 "2026-02-25T23:19:39Z")

</div>

> [@RocketMan](#):
>
> id you pull out all the port configuration files and see if they had any janky code?
> 
> It might be worth a few bucks to ask the agent to make a document of your entire codebase and make the prompt specific enough around port and caching.
> 
> Before spending money on the agent though.
> 
> 1.) Spend time thinking the prompt out.
> 
> 2.) Ask your outside Sloppy Joe (AI) to make the prompt the way it would want it.
> 
> 3.) refine it more and make sure it’s explicitly designed to give you a solid audit on your configuration files.
> 
> After this I’d take that prompt and load it in the agent.
> 
> The Replit Md is my worst enemy. It justs like to do whatever and changes adds things it shouldn’t and the agent just does not care or seem to address it even when asked.
> 
> You always have to manually sift the codebase and make sure the Sloppy Joe knows exactly what you want. Then tripple check the Replit Md and why the AI decided to use what it used in th Replit Md sometimes it’s on drugs. Sometimes you get Elon musk.
> 
> It depends
> 
> If this fails then ask it to wipe out all port configuration and rewire it. Caution this could become expensive.
> 
> If time is an issue and money is not then give it a whack. It’s hard to know without access to your projects. I don’t have the authority to do that safely.

thanks - there is no code hidden anywhere. quinn has replied again agreeing its likley platfomr level but same answer of they have high demand please be patient.

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 11:23pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/11 "2026-02-25T23:23:51Z")

</div>

makes sense. must be bigger fires elsewhere

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 11:30pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/13 "2026-02-25T23:30:59Z")

</div>

i’m coding with claude opus right now (in replit shell) on max plan. its been amazing and 80% cheaper. pretty sure replit use 4.5 too ? that may have changed yesterday

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 25, 2026, 11:43pm UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/15 "2026-02-25T23:43:35Z")

</div>

i dunno . i racked up big costs. i was using gem pro 3 to help arhictect design with detailed replit agent prompts and my bill was going up to $50 a day

---

<div class="post-metadata">

### Author: ![george](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@george](https://replit.discourse.group/u/george)
#### Post date: [February 26, 2026, 4:42am UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/17 "2026-02-26T04:42:53Z")

</div>

Okay, here is the issue. It was with my code! I hope this helps others who may hit this. I should point out Replit support did get back to me (I did have to really push though).

Issue:  
My before\_request handler was using request.headers.get(‘X-Forwarded-Proto’, ‘http’), which defaults missing headers to ‘http’. When Replit’s internal health checker hits [http://127.0.0.1:1104/](http://127.0.0.1:1104/) directly (no proxy, no X-Forwarded-Proto header), the middleware treated it as an external HTTP request and returned a 301 redirect to HTTPS. The health checker followed the redirect and tried HTTPS against Gunicorn, which only serves HTTP, causing the “http: server gave HTTP response to HTTPS client” error loop.

Fix: Changed to request.headers.get(‘X-Forwarded-Proto’) (no default). Internal health check requests with no header now pass through. External requests through the load balancer with X-Forwarded-Proto: http still get redirected to HTTPS as intended.

Separate issue: [[ports]] keeps being auto-added to .replit during deploy. While this wasn’t the primary cause, it would be helpful to know if there’s a way to prevent autoscale deployments from injecting [[ports]] automatically. (Waiting for a reply on this)

---

<div class="post-metadata">

### Author: ![manuelrpoh](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@manuelrpoh](https://replit.discourse.group/u/manuelrpoh)
#### Post date: [April 2, 2026, 3:22am UTC](https://replit.discourse.group/t/autoscale-deployment-failing-healthcheck-probing-wrong-port-1104/9492/19 "2026-04-02T03:22:51Z")

</div>

Thank you!! This was the root-cause for me and I was able to get my deployment unblocked.
