<?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>topic [Node.js] HDBEXT - Connection pooling example in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105418#M1973074</link>
    <description>&lt;P&gt;Hello everyone!&lt;/P&gt;
  &lt;P&gt;We are currently developing a Node.js application using the hdbext driver to connect and execute queries against our HANA database&lt;/P&gt;
  &lt;P&gt;While the default connection works perfectly, we would like to implement connection pooling to increase our performance.&lt;/P&gt;
  &lt;P&gt;In the &lt;A href="https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/54513272339246049bf438a03a8095e4.html#loio54513272339246049bf438a03a8095e4__section_ilt_mkt_vt"&gt;official documentation&lt;/A&gt;, the create connection snippet is written as follows:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var hanaConfig = { 
  host : 'hostname', 
  port : 30015, 
  user : 'user', 
  password : 'secret' 
}; 
hdbext.createConnection(hanaConfig, function(error, client) { 
  if (error) { 
    return console.error(error); 
  } 
  client.exec(...); 
}); &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And to use connection pooling, the "hanaConfig" object must contain the "pooling" property with value of true, like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var hanaConfig = { 
  host : 'hostname', 
  port : 30015, 
  user : 'user', 
  password : 'secret',
  pooling: true
}; &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Up until this point we can create the connection succesfully. However, to acquire a client from the connection pool, the function "acquire" fails:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;pool.acquire(options, function(err, client) {});&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Error message says that our "hdbext" object doesn't have that function, neither the client object retrieved from the "createConnection" callback.&lt;/P&gt;
  &lt;P&gt;Has anyone had the same issue, or have an idea where it originates? Any recommendation for using pooling in Node.js with a HANA database connection?&lt;/P&gt;
  &lt;P&gt;I'm thankful for any help! Best regards,&lt;/P&gt;
  &lt;P&gt;Sergio&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 17:35:15 GMT</pubDate>
    <dc:creator>former_member613954</dc:creator>
    <dc:date>2019-09-11T17:35:15Z</dc:date>
    <item>
      <title>[Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105418#M1973074</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;
  &lt;P&gt;We are currently developing a Node.js application using the hdbext driver to connect and execute queries against our HANA database&lt;/P&gt;
  &lt;P&gt;While the default connection works perfectly, we would like to implement connection pooling to increase our performance.&lt;/P&gt;
  &lt;P&gt;In the &lt;A href="https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/54513272339246049bf438a03a8095e4.html#loio54513272339246049bf438a03a8095e4__section_ilt_mkt_vt"&gt;official documentation&lt;/A&gt;, the create connection snippet is written as follows:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var hanaConfig = { 
  host : 'hostname', 
  port : 30015, 
  user : 'user', 
  password : 'secret' 
}; 
hdbext.createConnection(hanaConfig, function(error, client) { 
  if (error) { 
    return console.error(error); 
  } 
  client.exec(...); 
}); &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And to use connection pooling, the "hanaConfig" object must contain the "pooling" property with value of true, like this:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var hanaConfig = { 
  host : 'hostname', 
  port : 30015, 
  user : 'user', 
  password : 'secret',
  pooling: true
}; &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Up until this point we can create the connection succesfully. However, to acquire a client from the connection pool, the function "acquire" fails:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;pool.acquire(options, function(err, client) {});&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Error message says that our "hdbext" object doesn't have that function, neither the client object retrieved from the "createConnection" callback.&lt;/P&gt;
  &lt;P&gt;Has anyone had the same issue, or have an idea where it originates? Any recommendation for using pooling in Node.js with a HANA database connection?&lt;/P&gt;
  &lt;P&gt;I'm thankful for any help! Best regards,&lt;/P&gt;
  &lt;P&gt;Sergio&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 17:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105418#M1973074</guid>
      <dc:creator>former_member613954</dc:creator>
      <dc:date>2019-09-11T17:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: [Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105419#M1973075</link>
      <description>&lt;P&gt;How did you create the "pool" object?&lt;/P&gt;&lt;P&gt;From my point of view the documentation is not really up to date. As it can be read in the "migration.md" file of the  @sap/hdbext package, for using a connection pool the pooling option should be set to true when creating a connection. Than pooling is used by default. In older versions of the package (&amp;lt;= 4), for pooling first a pool object needed to be created (e.g. via hdbext.getPool) and then call the "acquire" function on that pool object. That is not really necessary anymore in the package versions &amp;gt;= 5.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 06:54:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105419#M1973075</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2019-09-13T06:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: [Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105420#M1973076</link>
      <description>&lt;P&gt;Hi Florian! First of all sorry for the late response.&lt;/P&gt;&lt;P&gt;During the last week we were making performance tests with the pooling option set to true using the 6.0.1 version of the hdbext module. You are right: It is creating a pooled connection and we have no performance loss compared to the hana-client driver, along with its pooled connection.&lt;/P&gt;&lt;P&gt;We didn't create the pool object, we were using the same hdbext library for making the pooled connection, my mistake.&lt;/P&gt;&lt;P&gt;Thank you very much for your help clarifying this matter!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 16:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105420#M1973076</guid>
      <dc:creator>former_member613954</dc:creator>
      <dc:date>2019-09-23T16:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: [Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105421#M1973077</link>
      <description>&lt;P&gt;okay got it working after few tries... weird that it doesn't get installed from the first time&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2019 16:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105421#M1973077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-21T16:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: [Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105422#M1973078</link>
      <description>&lt;P&gt;Sorry I am still not sure how connection pooling works with @sap/hdbext... Do you need this in every request ? &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hdbext.createConnection({...pooling: true }, (err, conn) =&amp;gt; {
  if (err) {
    // handle
  } else {
    conn.exec(query, (err, data) =&amp;gt; {..});
    conn.close(); // Does this return the connection to the pool ? 
  }
});
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2022 09:11:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/12105422#M1973078</guid>
      <dc:creator>former_member819975</dc:creator>
      <dc:date>2022-09-01T09:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: [Node.js] HDBEXT - Connection pooling example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/14097274#M2041778</link>
      <description>&lt;P&gt;Hello, how do you use pooling now? Can you show an example?&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 11:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/node-js-hdbext-connection-pooling-example/m-p/14097274#M2041778</guid>
      <dc:creator>goran_1215</dc:creator>
      <dc:date>2025-05-09T11:43:25Z</dc:date>
    </item>
  </channel>
</rss>

