2 months ago
Description of the issue
=========================
Hi Team,
While integrating the Kong Gateway, we are facing an issue with backend API calls. Sometimes the requests are processed successfully, but other times they fail.
Flow:
When a request comes from the frontend, it goes through the Kong Gateway (deployed on Railway Cloud). The gateway should then route the request to our backend service API. However, the behavior is inconsistent — some requests work as expected, while others fail.
Could you please provide guidance or suggestions on how to fix this issue?
Railway environment : Production
Error Logs
========
Getting below message
requestId:
"9CPeketYRk6STd52DcO5xA"
timestamp:
"2025-09-22T15:20:56.713906654Z"
method:
"GET"
path:
"/employees"
host:
"cloom-crud-kong-gateway-production.up.railway.app"
httpStatus:
499
upstreamProto:
"HTTP/1.1"
downstreamProto:
"HTTP/2.0"
responseDetails:
"client has closed the request before the server could send a response"
totalDuration:
299732
upstreamAddress:
"http://[fd12:adcb:5716:0:9000:48:e846:d438]:8000"
clientUa:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
upstreamRqDuration:
299732
txBytes:
0
rxBytes:
771
srcIp:
"49.206.130.220"
edgeRegion:
"asia-southeast1-eqsg3a"
upstreamErrors:
"[{"deploymentInsta…
Link to GitHub repo/code or template you're using, if applicable : Its not applicable since its a private repo
CLOOM-CRUD-Kong-Gateway
]=======================
Docker file code
===========
FROM kong:3.3
COPY kong.yml /etc/kong/kong.yml
EXPOSE 8000 8443 8001 8444
# Railway dynamic PORT
ENV KONG_PROXY_LISTEN=0.0.0.0:${PORT:-8000}
ENV KONG_DATABASE=off
ENV KONG_DECLARATIVE_CONFIG=/etc/kong/kong.yml
CMD ["kong", "docker-start"]
CLOOM-CRUD-Kong-Gateway
======================
kong.yml file code
===========
formatversion: "2.1"
services:
- name: employees-service
protocol: https
host: cloom-crud-backend-production-0113.up.railway.app
port: 443
path: /api
connect_timeout: 10000
read_timeout: 10000
write_timeout: 10000
routes:
- name: employees-route
paths:
- /employees$
strip_path: false
regex_priority: 10
plugins:
- name: cors
config:
origins: ["*"]
methods: ["GET", "POST", "OPTIONS"]
headers: ["Accept", "Authorization", "Content-Type"]
credentials: true
max_age: 3600
4 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Support Required: Intermittent Issues with Kong Gateway Integration AND Status code 499
🧵 Are SRV records present within private network internal DNS?
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
Hiya!
You'll need to redeploy your service and enable private networking on the Settings tab for this to work. The timing of this ticket lines up with an outage we had earlier today, which is why you received the above error. https://status.railway.com
Status changed to Awaiting User Response Railway • 3 months ago
2 months ago
Hello!
We're acknowledging your issue and attaching a ticket to this thread.
We don't have an ETA for it, but, our engineering team will take a look and you will be updated as we update the ticket.
Please reply to this thread if you have any questions!
Status changed to Solved echohack • 3 months ago
2 months ago
✅ The ticket Database Connection Issue has been marked as completed.