<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Node request getting timed out after 30 seconds in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666348#M4752045</link>
    <description>&lt;P&gt;Thank You for the Response Jun, &lt;/P&gt;&lt;P&gt;This how I have added the timeout parameter in the MTA file. Please confirm if this is okay.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138671-image.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 18:09:01 GMT</pubDate>
    <dc:creator>rahilkhan4u</dc:creator>
    <dc:date>2023-02-14T18:09:01Z</dc:date>
    <item>
      <title>Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaq-p/12666345</link>
      <description>&lt;P&gt;I have a node application deployed on BTP space, All the of request are getting timeout after 30 seconds. &lt;/P&gt;
  &lt;P&gt;I have tried setting the request timeout manually to 2 minutes from UI and from node itself, But nothing works. After going through lots of blogs, I found that there are some server level settings where the node application is deployed. Is there any way to change the files of server or setting of the server from node application?&lt;/P&gt;
  &lt;P&gt;Thanks in Advance.&lt;/P&gt;
  &lt;P&gt;For testing purpose I created below endpoint and waiting for 2 minutes before sending the response. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138668-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But when I hit this endpoint from UI, the request only last for 30 seconds and it gets timed out. This is how I am calling this endpoint.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138669-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Also note that, Request is getting timed out only after deployment, it is working fine on local.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 12:03:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaq-p/12666345</guid>
      <dc:creator>rahilkhan4u</dc:creator>
      <dc:date>2023-02-14T12:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666346#M4752043</link>
      <description>&lt;P&gt;Hello Rahil,&lt;/P&gt;&lt;P&gt;the issue is really broad and it is not clear what you are calling and how. If you use the SAP cloud SDK to make the HTTP request in a JavaScript application you can set the timeout like on any http client. In order to get support you should provide the following information:&lt;/P&gt;&lt;P&gt;- Give a code sample how you make the call&lt;/P&gt;&lt;P&gt;- Is it expected for the call to take that long? If not huge amounts of data are send a request should not take 30 seconds or two minutes. &lt;/P&gt;&lt;P&gt;- Make a connectivity test in your BTP account using some request which is fast to ensure that your setup is ok and the timeout is not related to a connectivity issue.&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 14:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666346#M4752043</guid>
      <dc:creator>frank_essenberger1</dc:creator>
      <dc:date>2023-02-14T14:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666347#M4752044</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;group: destinations &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;properties: &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;forwardAuthToken: true &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;name: *** &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;url: **** &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;timeout: 600000&amp;lt;br&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;can you try this in your yaml file?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 15:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666347#M4752044</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2023-02-14T15:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666348#M4752045</link>
      <description>&lt;P&gt;Thank You for the Response Jun, &lt;/P&gt;&lt;P&gt;This how I have added the timeout parameter in the MTA file. Please confirm if this is okay.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138671-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 18:09:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666348#M4752045</guid>
      <dc:creator>rahilkhan4u</dc:creator>
      <dc:date>2023-02-14T18:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666349#M4752046</link>
      <description>&lt;P&gt;Thank You for the response Frank.&lt;/P&gt;&lt;P&gt;I have added the required information in the question now.&lt;/P&gt;&lt;P&gt;I am doing some data processing in node application, it is expected to take little long, When I hit the same endpoint on Local, it return response in around 2 minutes 25 seconds. But when hit the same end point after deployment, it gets timed out in 30 seconds, Not just this request but all the request which are expected to take some time are getting timed out in 30 seconds.&lt;/P&gt;&lt;P&gt;Also I don't think this is a connectivity issue because I have tried it on different network at different interval of time and if it was a connectivity issue then request should have timed out at different internal of time, each time it is getting timed out in exactly 30 seconds.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 18:17:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666349#M4752046</guid>
      <dc:creator>rahilkhan4u</dc:creator>
      <dc:date>2023-02-14T18:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666350#M4752047</link>
      <description>&lt;P&gt;no.&lt;/P&gt;&lt;P&gt;it should be your ui app module, which requires service module as dependency.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 18:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666350#M4752047</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2023-02-14T18:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666351#M4752048</link>
      <description>&lt;P&gt;Thanks alot Jun, After adding the timeout parameter in app service the issue gets resolved.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2138691-image.png" /&gt;&lt;/P&gt;&lt;P&gt;For others, this is where I added the timeout.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rahil Khan&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 07:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666351#M4752048</guid>
      <dc:creator>rahilkhan4u</dc:creator>
      <dc:date>2023-02-15T07:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666352#M4752049</link>
      <description>&lt;P&gt;Hi Rahil,&lt;/P&gt;&lt;P&gt;thanks for the info. The way you set the timeout is right in axios. Also that it works locally seems to indicate that the code is correct. Unfortunately I can not really help here because in the SDK we use also axios latest version which I assume is the same you use. You could also try node fetch to see if it is a problem with the client.&lt;/P&gt;&lt;P&gt;This would mean there is some difference in running the application locally and on the cloud. Have you compared the node version used? This has an effect on the http agent used. I hope the colleagues from the BTP see this issue and comment on it. They should know if there is something killing long running request - I really doubt this to be honst and assume it is a difference in used node versions or so.&lt;/P&gt;&lt;P&gt;When I googled it quickly there was a default server.timeout in node 13 and below set to 2minutes per default. This was dropped in new node version to a value of 0 meaning no timeout. So please ensure you are using node 14 or above - which you did locally most likely but not on BTP.&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Frank &lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 16:08:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666352#M4752049</guid>
      <dc:creator>frank_essenberger1</dc:creator>
      <dc:date>2023-02-15T16:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666353#M4752050</link>
      <description>&lt;P&gt;see here: &lt;A href="https://stackoverflow.com/questions/23874954/is-there-a-default-timeout-in-node-js-for-http-request" target="test_blank"&gt;https://stackoverflow.com/questions/23874954/is-there-a-default-timeout-in-node-js-for-http-request&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 16:11:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666353#M4752050</guid>
      <dc:creator>frank_essenberger1</dc:creator>
      <dc:date>2023-02-15T16:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Node request getting timed out after 30 seconds</title>
      <link>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666354#M4752051</link>
      <description>&lt;P&gt;Thanks Frank for the response, It seems the issue was in MTA file, As Jun suggested, We need to add timeout in mta.yml file under app service. Thanks for the support Frank. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 20:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/node-request-getting-timed-out-after-30-seconds/qaa-p/12666354#M4752051</guid>
      <dc:creator>rahilkhan4u</dc:creator>
      <dc:date>2023-02-15T20:45:26Z</dc:date>
    </item>
  </channel>
</rss>

