49

I am requesting an API from postman and getting response after 2 minutes, which is fine because the business logic is complex. But the problem is that postman is giving

502 Bad Gateway

After that, I checked the business logic and found that it successfully executed without any error.

So my concern is how to increase the request time.

Rune FS
  • 21,497
  • 7
  • 62
  • 96
Akshay Pingle
  • 493
  • 1
  • 4
  • 5
  • 12
    For anyone reading this in the future - although the responses below are correct with regards to how to increase Postman timeout, none of them point to the real problem the OP seems to be having. You do not get a 502 Bad Gateway from a client-side timeout - a 502 _is_ a response. You are getting a response before you are timing out client-side. What I strongly suspect is happening here is that the client is accessing the API via a load balancer or some other type of network device and that device is configured to time out after 120 secs, at which point the device returns the 502. – martinp999 May 06 '21 at 00:50

4 Answers4

75

What version of postman do you use? In version 4.1.3 I have XHR Timeout(ms) which means :

  • Set how long the app should wait for a response before saying that the server isn't responding.

Settings -> general ->XHR Timeout(ms) enter image description here

abyversin
  • 819
  • 7
  • 8
26

For POSTMAN client new version go to Settings-->General-->Request timeout in ms (0 for infinity)

enter image description here

Stefano
  • 1,439
  • 4
  • 23
  • 38
6
XHR Timeout(ms)

Set how long the app should wait for a response before saying that the server isn't responding.

Go to settings -> general ->XHR Timeout(ms) set it to 120000

P S M
  • 1,121
  • 12
  • 29
5

Request timeout setting option in the latest version v10.8.1

enter image description here

Abhishek Kumar
  • 435
  • 1
  • 6
  • 16