TTFB on whatwg-fetch request from NodeJS app is over 15 seconds every time. What am I doing wrong?

I am making a whatwg-fetch request from my React application served up at like so:

    fetch('', {
      credentials: 'include',
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      body: JSON.stringify({
        SearchValue: this.props.SearchValue,
        SearchOption: this.props.SearchOption,
    .then(response => response.json())
    .then(data => {

On the other end (at I have this:

header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
header("Access-Control-Allow-Headers: content-type");
header("Access-Control-Max-Age: 86400");

/* Prepared Statement (not very complicated, returns 5 results) */

For some reason the server takes 15 seconds to respond to my fetch request. It takes 15 seconds (most of the time) just to get the first byte back from the responding server. What am I doing wrong? How do I use fetch to get data from my database in JSON format?


Are you seeing the same behavior when accessing directly?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @donaldwaynemoorejr,

Please make sure you are not making any external requests which might be slowing down the application.

One other suggestion I have after some research and it seems the problem is related with the way Chrome uses connections, if you are checking this with a Chrome browser that might be reason behind it.