# Why was my flow cancelled?

**URL:** https://connective.celigo.com/t/why-was-my-flow-cancelled/605
**Category:** Integrator.io
**Tags:** batch-size, page-size, snowflake, branching, flow-builder
**Created:** [November 14, 2022, 4:01am UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605 "2022-11-14T04:01:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alexbaeza](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@alexbaeza](https://connective.celigo.com/u/alexbaeza)
#### Post date: [November 14, 2022, 4:01am UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/1 "2022-11-14T04:01:40Z")

</div>

I had created a flow that reads from SP-API and writes to a single table

 ![5301043caa20740200000001-670a27faac814528b744061a8a418849.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/e/e1b09ed322af46e7687d200f6fb27d5e4545b91a.png)

I had set the batch and page size set to 3000 and have run this flow with multiple pages without any issues.

Since this is a temp table that will be deleted after I merge it into the final table, I wanted to keep a history of all the exports requested from SP-API, because it is sometimes useful to see what the data looked like on a certain day in the past (I plan to run this job daily).

So, I created a branch so that when a page is read, that same page is written to both the temp table and a history table:

 ![5301043caa20740200000001-aeef0d79151b42bfaeeee38b9aaf08da.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/7/7e2ab56cc6d43f779bb4487898437982b38a245b.png)

 ![5301043caa20740200000001-ad51a7fc497347fd8403e415ea1c9d9e.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/1/1ae35e257f7a429dc22d290092360d0502abbc45.png)

 ![5301043caa20740200000001-7e83b839c77d40538ccac8eea419edee.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/3/3efcded00957a0392695567239a63898536011ee.png)

When I ran this new branched flow, it gave me the following results:

 ![5301043caa20740200000001-c4c1c5f41697488bac04727f71002baf.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/7/7060c2401852fd9a6cc8d3a1fc06899f242e49ab.png)

Both imports show as canceled.

The temp table contained 907 records (event though the run console shows 0 under the success column)

The history table was empty.

After reading [https://connective.celigo.com/t/troubleshooting-why-is-my-job-within-a-flow-that-imports-to-ftp-seemingly-canceled/824](https://connective.celigo.com/t/troubleshooting-why-is-my-job-within-a-flow-that-imports-to-ftp-seemingly-canceled/824) I figured that maybe my page/batch size might be some how affecting this. Maybe the export page is somehow duplicated and causes the 3M size to trigger a cancellation, so I reduced my page/batch size to 1000.

Here are the results:

 ![5301043caa20740200000001-c51463ded1ce4c6b8a00bd391894643b.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/c/c5d8a031792ebba76730e2fee565bb718fc4d03b.png)

Once again the run console reports canceled on both tables and that only one page was processed, but when I look at the tables in snowflake both tables contained 1206 rows.

Assuming that I was headed in the right direction, I again modified my page size and batch size from 1000 to 500, and re-ran the flow with the same start date parameters.

 ![5301043caa20740200000001-12dac18b2f8e497ba8d7ab45dd23365a.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/d3213140c89c89b4ba50ac3e98c8c2ef8ddeeb7c.png)

Confusingly, this time, the temp table table contained 0 rows and the history table contained 500 rows.

I had previously set the sp-api connection concurrency to 1 in an attempt to throttle my requests to the SP-API, and thought that this might be the problem, so I changed it to 3 thinking that maybe this might be causing a cancellation

 ![5301043caa20740200000001-2731d97ae88f40ab974b4e7975d37e3c.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/a/a3f86292d61aa34db01a3f73bcf95e8e2c6a2f4a.png)

This had no effect on the results.

I will continue experimenting, perhaps without branching.

---

<div class="post-metadata">

### Author: ![kathyanaqueeman](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/kathyanaqueeman/32/9122_2.png) [@kathyanaqueeman](https://connective.celigo.com/u/kathyanaqueeman)
#### Post date: [November 15, 2022, 2:41pm UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/2 "2022-11-15T14:41:46Z")

</div>

Hello @alexbaeza,

Can you retry your flow? We had a recent release that might help solve these issues. If this doesn't work, we recommend opening a [ticket](https://docs.celigo.com/hc/en-us/articles/4407535381147-Submit-a-support-ticket "https://docs.celigo.com/hc/en-us/articles/4407535381147-Submit-a-support-ticket") so Support can review your configuration and work with you on a solution. Thanks!

Kathyana

---

<div class="post-metadata">

### Author: ![alexbaeza](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@alexbaeza](https://connective.celigo.com/u/alexbaeza)
#### Post date: [November 15, 2022, 6:15pm UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/3 "2022-11-15T18:15:59Z")

</div>

Thank you, I will retry this.

---

<div class="post-metadata">

### Author: ![alexbaeza](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@alexbaeza](https://connective.celigo.com/u/alexbaeza)
#### Post date: [November 16, 2022, 2:32am UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/4 "2022-11-16T02:32:20Z")

</div>

I retried creating the branched flow below:

 ![5301043caa20740200000001-c8e2701a415f4232b57596f49abc6d5f.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/8/802b629e048f3a347b3cc2779d0c43d40fb9d7d1.png)

The export checks for data in the stage table. The two branches should insert into a history table (using sql) and also merge into a merge table (using sql).  
What I want is for those to SQL statements to execute in parallel. My concurrency for the database is set to 10

 ![5301043caa20740200000001-9087f51ed8c5441387f8091801f639b8.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/6/686ade269a534e82acb76de591d5f386ecda77a7.png)

---

<div class="post-metadata">

### Author: ![alexbaeza](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@alexbaeza](https://connective.celigo.com/u/alexbaeza)
#### Post date: [November 16, 2022, 2:33am UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/5 "2022-11-16T02:33:00Z")

</div>

These two sql statements work fine without the branch if I execute one step after the other.

---

<div class="post-metadata">

### Author: ![vikramthakre](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@vikramthakre](https://connective.celigo.com/u/vikramthakre)
#### Post date: [November 16, 2022, 7:13am UTC](https://connective.celigo.com/t/why-was-my-flow-cancelled/605/6 "2022-11-16T07:13:36Z")

</div>

Hi @alexbaeza,  
  
We are looking into the page index issue reported for snowflake.  
Could you please confirm whether the flow cancel issue first reported in this thread has been resolved.  
As Kathyana suggested ,Please raise a ticket if you are still facing the flow cancellation issue.  
  
Thanks,  
Vikram
