Http status code 504 Gateway time out error

When i load testing an api, with 150 simultaneous calls,some iterations I'm getting response with out any issues but some iterations few calls are getting failed due to http status code 504 gateway timeout errors.
But response times of api calls are below 15sec I'm not understandig the issue whether it is server side or from LR tool.
If it is server side where can I check about the issue and if it is from tool what http changes we can try to resolve this posting my http settings in LR.please help me on this.
Keep alive http connects -not checked
Connection time out 120
Response receive time out 120
Step down load time out 1200

  • Hi Reddym,

    HTTP 504 means that there's a problem on communication between the server you try to contact and another upstream server; so we can say it's a servers communication problem. 

    From what machine you try to contact the server? In your script you contact directly the server or maybe the URL is referred to some balancing component? Please note that, in case of massive test, response times is deterirated from the net performances and all the components that form the application's architecture (like a servers chain).