Comments
Postman replies with an ETIMEDOUT despite the timeout configuration is set to infinite (value = 0).
Postman stops in 20 seconds.
The request takes 40sec to reply. I have tried with both curl and another REST client and returns data.
App information
- Postman Version: v7.5.0
- OS: Windows 10 PRO 2018
Hey @mbracero, thanks for reaching out! Unfortunately I’ve been unable to reproduce this.
I tried sending a request to a local server I setup which sends response after 5 mins. Here’s the code for the server:
const express = require('express'), port = process.env.PORT || 3000, app = express(); app.use(express.json()); app.post('/timeout', (req, res) => { setTimeout(() => { res.json({ result: 'ok' }).end(); }, 5 * 60 * 1000); // 5 mins }); let server = app.listen(port, function (err) { if (err) { console.log(err); } console.log('Listening on', port); }); server.setTimeout(10 * 60 * 1000); // 10 mins
Postman was able to get the response just like curl.
What kind of service are you using? Is there a chance this got timed out because of a Proxy/server?
Is there any publicly accessible endpoint I can reproduce this behaviour with?
Waiting for your reply!
Hi @coditva , They’re intranet endpoints, so unfortunatelly I can’t shere with you.
They’re simple REST API.
As I said, it’s extrange becasue with another REST client app, it doesn´t happends. And even I thought that timeout was for the whole request (independently of the layers the request has to go thougth).
@mbracero We have updated the Postman Console to include a lot of information to help debug issues like these. Can you update to Postman v7.10.0 and try finding the cause of the timeout?
In the Console you see the re-directs and information about proxy which might help!
Download link: https://dl.pstmn.io/download/version/7.10.0/win
Closing this issue now, as we are not able to reproduce this and no other user have reported this. Feel free to re-open the issue if the issue still persists.
I’m just now experiencing the very same behaviour.
I have a call to a REST API that always times out after about 20 seconds.
My time out value is set to 0, but increasing it to arbitrary numbers does not have any effect.
I’m running v 7.27.1
I’m just now experiencing the very same behaviour.
I have a call to a REST API that always times out after about 20 seconds.
My time out value is set to 0, but increasing it to arbitrary numbers does not have any effect.
I’m running v 7.27.1
The problem was solved — partly: The underlying issue was on the network level. My computer with Postman was not allowed to connect to the target server.
I’m now wondering if Postman could report this back to me in a different way that could help me find the problem more easily.
I am now facing same issue with Postman Version 7.28. I have tried couple of version with installations and i am stuck at same point. The API is accessible when tried through any browser but from Postman its still not accessible. Please resolve or share work around for this problem.
I just ran into the same issue with Postman 8.6.2. I’m not using any obvious proxy (but I’m testing against a Netlify local dev server). While debugging my endpoint, which was being hit successfully, Postman would time out even with a 0 in the settings. (I don’t think I ever set that though, it was just already set to 0.)
It was always a 10-second timeout, so I just changed the setting to 60000 ms just to see if that extended it. It did. So it’s all working without an earlier timeout if I just give it a larger value. It is as if the 0 is not the actual value, but the UI is showing 0 if it’s not yet set. Probably now that I’ve changed it to 60000, if I set it back to 0 it will probably not timeout at all anymore. Oh, that’s a quick test so… and yes, confirmed. Set back to 0, after setting it to 60000, and it is not timing out after 10 seconds anymore.
I strongly suspect it’s not reproducible because the bug is only present when the timeout has never been set, and it’s already been set to something in the installations being tested.
For others reading this, there appears to be a workaround of setting it to something other than zero, then setting it to zero.
I just ran into the same issue with Postman 8.6.2. I’m not using any obvious proxy (but I’m testing against a Netlify local dev server). While debugging my endpoint, which was being hit successfully, Postman would time out even with a 0 in the settings. (I don’t think I ever set that though, it was just already set to 0.)
It was always a 10-second timeout, so I just changed the setting to 60000 ms just to see if that extended it. It did. So it’s all working without an earlier timeout if I just give it a larger value. It is as if the 0 is not the actual value, but the UI is showing 0 if it’s not yet set. Probably now that I’ve changed it to 60000, if I set it back to 0 it will probably not timeout at all anymore. Oh, that’s a quick test so… and yes, confirmed. Set back to 0, after setting it to 60000, and it is not timing out after 10 seconds anymore.
I strongly suspect it’s not reproducible because the bug is only present when the timeout has never been set, and it’s already been set to something in the installations being tested.
For others reading this, there appears to be a workaround of setting it to something other than zero, then setting it to zero.
I think you’re on to something here but this didn’t solve it for me unfortunately. My experience:
Request is a non proxied totally regular POST to an external server.
- Timeout setting set to 0 in Postman. Request times out after 76 seconds consistently.
- Set timeout setting to 10000 in Postman. Request now times out after 10 seconds consistently.
- Set timeout setting back to 0 in Postman. Request now times out after 76 seconds consistently.
Seems more than likely that there is something along the request path causing this besides Postman but I’m unable to prove that and as far as I know there is nothing of the sort.

@boylec Is the server timing out, or is Postman timing out? In the first case you’ll still get a response with an error, in the second one you should be getting this error:
@appurist Thank you for the details, we’ll see if we can replicate it on our end. cc @saswatds
@arlemi Thanks for the response.
Turns out this is a case where I was using the wrong URL. (wrong subdomain to be precise)
Curious that this causes a «Request timed out» rather than a «DNS record not found» or some such.
Either way though this turned out to not be an issue with the request timeout setting for me.
This the error message I’m getting. The response didn’t time out, the sending of the request itself timed out.
Text Format
Could not send request
Error: Request timed out
@arlemi I have the same issue as above, here’s a screenshot of the console:
Is this happening again?
I’m on v9.24.2 and the request is taking a min or so (of a 1.5 min request) and am getting the Error: connect ETIMEDOUT
Follow-up: The request was firewalled, so the TCP connection was never established, which is what was timing out. Which is why I get the connection timeout error, and not some other request data timeout error.
I’m running into the same problem 😞.
If I send something wrong in the body of the request, the warning message comes correctly, but if the body is correct, request always return ETIMEDOUT:
- Return when body is wrong (purposely):
@alexa2me Is it possible that the server times out and not Postman? If you’re still seeing the issue please open a new issue so we can look into it.
There might be cases when your API doesn’t work, or exhibits unexpected behavior. If you’re not getting any response, Postman will display a message about an error in connecting to the server.
For more details about the possible causes of the error, open Postman Console. It has detailed information about the failure.
Consider these issues as you troubleshoot API requests.
Connectivity issues
If Postman is unable to connect to your server, it shows the message above. Usually, the easiest way to check if there are connectivity issues is to open your server address in a browser, such as Chrome or Firefox. If opening it in the browser works, then the possible causes could be:
Firewall issues
Some firewalls may be configured to block non-browser connections. In this case, you should talk to your network administrators for Postman to work.
Proxy Configuration
If you are using a proxy server to make requests, make sure you configure it correctly. By default, Postman uses the proxy settings configured in your Operating System’s network settings. Postman Console will provide debug information about the proxy server.
SSL Certificate issues
When using HTTPS connections, Postman might show the error above. In this case, you can turn off SSL verification in the Postman Settings. If that does not help, your server might be using a client-side SSL connection, which you can configure in Postman Settings. Use the Postman Console to ensure that the correct SSL certificate is being sent to the server.
Client Certificate issues
Client certificates might be required for this server. Fix this by adding a client certificate in the Postman Settings.
Incorrect Request URLs
If you use variables in your request, make sure they are defined in your environment or globals. Unresolved request variables may result in invalid server addresses.
Using incorrect protocol
Check whether you’re accidentally using “https://” instead of “http://” in your URL (or vice versa).
Invalid Postman behavior
Very rarely, it is possible that Postman might be making invalid requests to your API server. You can confirm this by checking your server logs (if available). We’re always watching out for these cases, so get in touch with us if you believe Postman is misbehaving. Let us know on our GitHub issue tracker if you feel that Postman is not working as intended.
Very short timeouts
If you configure a very short timeout in Postman, the request might timeout before completion, resulting in the error block above. Try increasing the timeout to avoid this issue.
Invalid Responses
If your server sends incorrect response encoding errors, or invalid headers, Postman will fail to interpret the response, causing the error above.
If you still can’t get your API working, help can frequently be found in the Postman community or Stack Overflow.
If you’ve tried unsuccessfully troubleshooting the issue, search the Postman issue tracker on GitHub to check if someone has already reported the issue and whether there is a known solution that you can use. If you’re reporting a new issue, follow these guidelines. If you wish to include confidential data, you can file a ticket via our support center and include the app’s console logs in your report to provide some helpful data for troubleshooting.
Postman — Set Timeout / Think Time / Pause / Delay
Those who are involved in API or web service development should be knowing about Postman, it is one of the most popular tools to build API requests and test them.
Collection Runner is one of the feature of Postman. You can create one or more requests and group them in Collection, and as name suggests, you can run the entire collection i.e. series or requests.
What if you need to add «Think Time» or «Delay» or «Pause» between two requests? It is surely possible, here are some options:
- Using Collection Runner GUI
- This option will be applicable to all the requests in the collection
- In the Collection Runner window, enter value for Delay in milliseconds
- Using Command Line
- This option will be applicable to all the requests in the collection
- Newman is a comman line collection runner for Postman
- Command To Execute: newman run <collection-file-source> —delay-request [number]
- Click here to get the details about Newman
- Newman installation instructions are available here
- Using Script
- This option can be used in individual requests
- You can configure different Delay values for individual requests
- To configure the delay, you have two options:
- Delay before executing the request
- Select individual request
- Click on «Pre-request Script» section
- Include this function: setTimeout(function(){}, [number]);
- Replace [number] with time in milliseconds
- Delay after executing the request
- Select individual request
- Click on «Tests» section
- Include this function: setTimeout(function(){}, [number]);
- Replace [number] with time in milliseconds
P.S. Click here to access my other posts.
Popular posts from this blog
Many developers and organizations use GitHub as code repository. Similarly, many prefer to commit code in GitHub repositories using various commands. I personally think that using any kind of user interface for committing code and performing various GIT operations is much more simpler and productive. SourceTree is one such Atlassian product. SourceTree is a free Git client and provides beautiful GUI that offers a visual representation for various Git repositories. For added security, you can enable 2FA (i.e. 2 Factor Authentication) for your GitHub account. Configuring GitHub with SourceTree is very very simple. Here are the steps on MAC OS (steps on Windows OS are similar): If you have not enabled 2FA: Open SourceTree and go to Preferences Select Accounts Click on Add button to add account On the pop-up window, select Host as «GitHub» Select Auth Type as «Basic» Type your GitHub username (not email) Type your password Select Protocol as HTTPS
JMeter is a powerful tool for API testing. Let’s say you are are writing test cases for one of your RESTful service; and you want to extract and validate the value returned as part of response header. It is little bit tricky to extract the value from Response Header in JMeter , but it is possible. For example, your RESTful service returns «ETag» in response header. When you look at the raw response data, the value is displayed something like this: ETag: 2666d92fa9ebf10250acdb235546f045 To exact value of this reaponse header in JMeter: Right click on your HTTP request, then add Post Processor element — Regular Expression Extractor Select Radio button — Main sample only Select Radio burron — Response Headers Type some name in Reference Name section — for example, eTagVariable Type this expression in Reference Expression section — ETag:s+(.+) IMPORTANT: This expression will select pick the ETag response header parameter and select everything after colon bla
If you are using Postman for your API testing and if you want to store and retrieve numeric values from environment variables, then here is a simple trick — use «Number» function. Let me explain the problem and solution. Problem: I want to store numeric value in environment variable, for example — response time, then I want to retrieve the value from this environment variable and use for comparison. Solution: To store response time in environment variable, use setEnvironmentVariable function To retrieve the value from environment variable, use postman.<variable_name> To convert variable value to number for comparison, use Number() function P.S. Click here to access my other posts.
You must be looking for some easy options to pretty format JSON data. Well, there are many websites which provides this capability and you can pretty format JSON data in browser. I use Sublime Text 3 text editor, and I was trying to see if I can pretty format JSON within the text editor itself. You can follow these simple steps: Open Sublime Text 3 text editor If you are using MAC OS Press Command + Shift + P Then select «Install Package» Search for «Pretty JSON» Install If you are using Windows OS Press CTRL + Shift + P Then select «Install Package» Search for «Pretty JSON» Install Once the installation is complete, select JSON string If you are using MAC OS Press Command + Control + J If you are using Windows OS Press CTRL + ALT + J Thats it! Now you don’t have to copy your JSON string from Sublime Text 3, paste in your browser, format it, then copy formatted JSON from browser and paste it back in your Sublime
Did you just realize that your Mule Application requires horizontal scalling ? Well, thats easy — just go to CloudHub Runtime Manager, select your application and change the «Workers» count from 1 to either 2, 3 or 4. If numbers are grayed out, then you might have to adjust the «Worker Size», or purchase additional capacity from MuleSoft. So, what is the issue then? At the time of the blog post, based on Mule documentation, if you are using only 1 worker and if you want to apply static IP, then you can simply navigate to «Static IPs» section in Runtime Manager and allocate the static IP address. The issue is when you want to apply Static IP addresses for more than 1 workers for various reasons including IP whitelisting. Based on Mule documentation you cannot apply static IPs if you are using more than 1 worker. From Mule Documentation: «Static IPs are not supported for private IP addresses inside a CloudHub VPC and it is only supported for app
macOS (Mac OS X or OS X) is the current series of Unix-based graphical operating systems developed and marketed by Apple Inc . designed to run on Apple’s Macintosh computers («Macs»). Within the market of desktop, laptop and home computers, and by web usage, it is the second most widely used desktop OS after Microsoft Windows . Recently, while working on one of my projects, there was a requiremnt to integrate our system with LDAP i.e. Lightweight Directory Access Protocol ( LDAP ). So, I wanted to try out some samples by installing OpenLDAP on my MAC. Initially, it looked streightforward but later I realized that there are multiple steps involved to get OpenLDAP up and running in my Mac. So, I thought of documenting various steps so that others can refer them. What do you need to begin? MAC Obviously you need MAC because these steps will work only for MAC (Sorry Windows users) Homebrew This is a package manager for macOS. Click here and follow the instructio
Oracle VirtualBox is a free, open source and powerful virtualization tool. Some minor configurations tweaks are required to access guest localhost from host computer. I am running VirtualBox with Ubuntu on my MAC OS. One easy way to access guest localhost from host computer is to start VirtualBox with following configurations. I have Ubuntu installed on virtual machine, but steps should be similar for other OS versions as well: Shut down virtual machine In VirtualBox, right click on the virtual machine and go to » Settings » Select » Network » tab Select » Adapter1 » Select » Enable Network Adapter » checkbox Click on » Attached to » drop down box and select » Host-only Adapter » Next, go to » Advanced » section Click on » Promiscuocus Mode » drop down box and select » Allow VMs » Finally, launch virtual machine Now, open command promt or terminal window and type » ifconfig &
As we all know, the L ightweight D irectory A ccess Protocol ( LDAP ) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. A common use of LDAP is to provide a central place to store usernames and passwords. This allows many different applications and services to connect to the LDAP server to validate users. This has a major benefit that allows a central place to update and change user passwords. With MuleSoft’s LDAP Connector , we can access and maintain directory information services over an IP network by connecting to any LDAP server. LDAP Connector is developed by MuleSoft’s developer community and it is categorized as Community Connectors. Latest LDAP Connector documentation is available here . Unfortunately, the information and examples of this connector are limited and scattered all over the web. Today, I am trying to cover as many details as p
Many companies use standard protocols such as FTP and SFTP to transfer files to external partner and receive files from external partners. Using FTP and SFTP provides simple to use and low cost platform for file exchange. In some business scenarios, companies may have to exchange sensitive information such as employee’s personal information, expense reports, payment information etc. Mule has the ability to encrypt a message payload, or part of a payload, using Pretty Good Privacy ( PGP ). PGP combines data compression and data encryption to secure messages. The compression reduces message transmission time between origin and destination. There are two scenarios that this document addresses: Using another party’s public key to encrypt a messages in a Mule application Using one’s own set of private and public keys so as to accept, and decrypt messages in a Mule application. What is Pretty Good Privacy (PGP)? Pretty Good Privacy ( PGP ) is a data encryption and decryption
I just started using Postman. I had this error «Error: socket hang up» when I was executing a collection runner. I’ve read a few post regarding socket hang up and it mention about sending a request and there’s no response from the server side and probably timeout. How do I extend the length of time of the request in Postman Collection Runner?
16 Answers
Socket hang up, error is port related error. I am sharing my experience. When you use same port for connecting database, which port is already in use for other service, then «Socket Hang up» error comes out.
eg:- port 6455 is dedicated port for some other service or connection. You cannot use same port (6455) for making a database connection on same server.
Sometimes, this error rises when a client waits for a response for a very long time. This can be resolved using the 202 (Accepted) Http code. This basically means that you will tell the server to start the job you want it to do, and then, every some-time-period check if it has finished the job.
If you are the one who wrote the server, this is relatively easy to implement. If not, check the documentation of the server you’re using.
Postman was giving «Could not get response» «Error: socket hang up».
I solved this problem by adding the Content-Length http header to my request
Are you using nodemon, or some other file-watcher? In my case, I was generating some local files, uploading them, then sending the URL back to my user. Unfortunately nodemon would see the «changes» to the project, and trigger a restart before a response was sent. I ignored the build directories from my file-watcher and solved this issue.
Here is the Nodemon readme on ignoring files: https://github.com/remy/nodemon#ignoring-files
I have just faced the same problem and I fixed it by close my VPN. So I guess that’s a network agent problem. You can check if you have some network proxy is on.
Socket hang up error could be due to the wrong URL of the API you are trying to access in the postman. please check the URL once carefully.
I solved this problem with disconnection my vpn. you should check if there is vpn connected.
this happaned when client wait for response for long time
try to sync your API requests from postman
then make login post and your are done
If Postman doesn’t get response within a specified time it will throw the error «socket hang up».
I was doing something like below to achieve 60 minutes of delay between each scenario in a collection:
get https://postman-echo.com/delay/10
pre request script :-
setTimeout(function(){}, [50000]);
I reduced time duration to 30 seconds:
setTimeout(function(){}, [20000]);
After that I stopped getting this error.
I had the same issue: «Error: socket hang up» when sending a request to store a file and backend logs mentioned a timeout as you described. In my case I was using mongoDB and the real problem was my collection’s array capacity was full. When I cleared the documents in that collection the error was dismissed. Hope this will help someone who faces a similar scenario.
It’s possible there are 2 things, happening at the same time.
- The url contains a port which is not commonly used AND
- you are using a VPN or proxy that does not support that port.
I had this problem. My server port was 45860 and I was using pSiphon anti-filter VPN. In that condition my Postman reported «connection hang-up» only when server’s reply was an error with status codes bigger than 0. (It was fine when some text was returning from server with no error code.)
When I changed my web service port to 8080 on my server, WOW, it worked! even though pSiphon VPN was connected.
Following on Abhay’s answer: double check the scheme. A server that is secured may disconnect if you call an https endpoint with http.
This happened to me while debugging an ASP.NET Core API running on localhost using the local cert. Took me a while to figure out since it was inside a Postman environment and also it was a Monday.
«Socket Hung Up» can be on-premise issue some time’s, because, of bottle neck in %temp% folder, try to free up the «temp» folder and give a try
I fixed this issue by disabling Postman token header.screenshot
What helped for me was replacing ‘localhost’ in the url to http://127.0.0.1 or whatever other address your local machine has assigned localhost to.









