Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
Post image 6
1 / 6
0

Ai Microservice went Down due to a Port Conflict.

DEV Community·Wasi Abdullah·26 days ago
#wf8odEyD
#ai#devops#docker#microservices#service#port
Reading 0:00
15s threshold

Wasi Abdullah

AI microservice went down in production because of a simple port conflict caused by 2 Pair programmers. All containers were showing healthy, no restarts, no crashes, and docker ps looked perfectly normal, yet the service was completely unreachable.


Instead of relying on container status, I went straight to the logs.

While reading through them, I spotted a port mismatch. The application was trying to bind to a different port than what the environment expected.

In the .env file, AI_ASSISTANT_PORT was set to 5051 while the service was configured for 5050. A recent change had quietly introduced this configuration drift.

After correcting the .env, I rebuilt only the affected service using docker compose build --no-cache ai-assistant and docker compose up -d --no-deps ai-assistant. The service recovered immediately. A small configuration mistake caused a production outage, and the logs made it obvious once I looked in the right place.

Read More