Support Required: Intermittent Issues with Kong Gateway Integration AND Status code 499
sahoosubhrajit
FREEOP

3 months ago

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?

Thanks & Regards,
Subhrajit

Attachments

Solved$10 Bounty

5 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


sahoosubhrajit
FREEOP

3 months ago

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:

"[{"deploymentInstanceID":"f33e8124-7ebc-42d6-a4b2-a170eb991d25","duration":299732,"error":"client has closed the request before the server could send a response"}]"


noahd
EMPLOYEE

3 months ago

Taking a peak at your logs which you provided and it looks like your backend is taking ~2-5 minutes to respond.
Could I get a bit more info on the project and why this would be happening?


sahoosubhrajit
FREEOP

2 months ago

Backend endpoint :    https://cloom-crud-backend-production-0113.up.railway.app/api/employees

Vercel Frontend endpoint :  https://cloom-crud-frontend-d2oxgybuc-sahoosubhrajits-projects.vercel.app/employees

Backend KONG Gateway Endpoint :   https://cloom-crud-kong-gateway-production.up.railway.app/employees

Here Backend endpoint is working fine and within less milisecond I'm getting response. Howevrer 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. But the behavior is inconsistent — some requests work as expected, while others fail.

KONG Gateway endpoint : https://cloom-crud-kong-gateway-production.up.railway.app/employees

To deploy this I am useing docker file and below is the code

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"]

And 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

So tell me where I am actullay doing mistake please


sahoosubhrajit
FREEOP

2 months ago

This issue has been fixed by changing docker file command.


Status changed to Solved noahd 2 months ago


Loading...