Gateway Timeout to worker nodes in Docker swarm

I have docker swarm cluster behind haproxy with 1 manger and 2 worker nodes. I'm getting "Gateway Timeout error " when accessing the services deployed in worker nodes. All services deployed in manger node is working fine.
","DownstreamContentSize":15,"DownstreamStatus":504,"Duration":30000362303,"OriginContentSize":15,