<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Connection Pool Issues</title><link>https://community.appian.com/discussions/f/general/29195/connection-pool-issues</link><description>Hi Everyone, 
 
 We have a requirement where Application is writing 500 rows parallely via startprocess smart service(Loop). 
 
 Now for every Write opertion sync will run that means sync will run 500 times in backend. It seems to be creating connection</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115481?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:49:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ee52e4fe-ce8b-453a-876d-d9b0d09eb100</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You add the delay timer prior to the Sync call (or if you&amp;#39;re just talking about the syncing that happens automatically after a Write, then before the Write node) in each process instance.&amp;nbsp; That means instead of 500 instances all hitting write and sync within a few milliseconds of each other, they&amp;#39;ll execute in a staggered fashion across the entire set, allowing time for the connections to open and close between the different sync calls.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115480?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:39:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:55192ecd-e533-4297-b6e2-314023a3d57c</guid><dc:creator>piyusha6151</dc:creator><description>&lt;p&gt;But how timer will help if process are running parallely as sync will anyways run with each write operation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115478?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:21:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2700b08b-1446-45d1-bfd7-ed457618a7a6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;d suggest you could still potentially batch the processing into larger batches than 1 row each - maybe 10 rows per process instance?&amp;nbsp; This would reduce the number of sync calls considerably, and probably not increase your processing time very much overall.&lt;/p&gt;
&lt;p&gt;An additional thing to consider would be to implement a timer at the end of each process that pauses it a few seconds.&amp;nbsp; I&amp;#39;ve set up something before where each instance gets a random number of seconds between 1 and 30, and pauses that long, which gives the back-end engines enough time to process the different instances without accidentally trying to process every single one in one big lump, and thus getting hung up on itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115476?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:13:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cae1baf4-7068-447b-a3b2-c968d27aae8c</guid><dc:creator>piyusha6151</dc:creator><description>&lt;p&gt;each row of excel needs to be parsed and based on value it has to&amp;nbsp;update few other attributes. And we process it sequentially then it is taking huge time and by doing load balancing and parallel processing, we are able to reduce the end to end process time by 10 times.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But as data is being written for the Entity having sync record defined.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115475?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:03:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5d9a20ed-b0dc-468c-8e9a-0a4cbb062069</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="57059" url="~/discussions/f/general/29195/connection-pool-issues/115474#115474"]Unfortunately,do not have any away to include those rows to be inserted at a time[/quote]
&lt;p&gt;Can you explain a bit more about the structure of this setup that requires each row to get its own... process instance, i assume?&amp;nbsp; If that&amp;#39;s correct, I don&amp;#39;t understand why the process can be passed multiple rows (or even all rows), versus requiring each row to be processed in its own instance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115474?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:01:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:564346df-0e9e-4301-89c5-b6cdd38e37d2</guid><dc:creator>Gopu Hema</dc:creator><description>&lt;p&gt;It is an upload process where each row in an excel is getting processed. Unfortunately,do not have any away to include those rows to be inserted at a time because it is taking too much time to process all the rows at a time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115473?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 15:00:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05c84609-c84c-4bc1-bc2d-7463701b55bf</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="57059" url="~/discussions/f/general/29195/connection-pool-issues/115472#115472"]each row in an excel is prcessing separtely in each instance[/quote]
&lt;p&gt;Is there a particular reason why each row requires a separate instance to be launched for it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115472?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:57:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3776530b-2d32-432d-8988-8c1f6b615452</guid><dc:creator>Gopu Hema</dc:creator><description>&lt;p&gt;It is an upload process where each row in an excel is prcessing separtely in each instance. So when an instance is writing a row into db, sync happening&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115471?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:57:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d7323810-980d-4a41-8046-9a52039fe6bf</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Yes, that&amp;#39;s what you said originally.&amp;nbsp; And I&amp;#39;m asking if there&amp;#39;s any way to restructure this, so that all 500 of those writes could be done in a single instance somehow.&amp;nbsp; Because it sounds as if you&amp;#39;re referring to 500 instances that are launched and write 100% simultaneously, which leads me to conclude that it might be possible, instead of launching 500 instances, to launch 1 instance with 500 rows (or 5 instances with 100 rows each, etc...).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115470?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:54:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa7387fc-6477-44b9-ac2f-c196b18247a7</guid><dc:creator>Gopu Hema</dc:creator><description>&lt;p&gt;500 instances are running parallely where each instnace is writing a row in db.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115469?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:51:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2aaba310-84e4-4e71-bb1c-afedc79c0c77</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Any reason why you need to do 500 writes vs just 1 write (and 1 sync with multiple ids)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection Pool Issues</title><link>https://community.appian.com/thread/115468?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:50:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36474755-51d4-4c36-88fb-75d18c845d1b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Could the 500 rows (or any subset of them) be written in one instance, versus looped?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>