# Is it possible that SELECT queries will cause a flow control issue for the Galera Cluster?

**URL:** <https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898>\
**Category:** Percona XtraDB Cluster 8.x\
**Created:** [July 25, 2023, 5:30pm UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898 "2023-07-25T17:30:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [July 25, 2023, 5:30pm UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/1 "2023-07-25T17:30:07Z")

</div>

Can someone answer the below question?

Is it possible that SELECT queries will cause a flow control issue for the Galera Cluster?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 25, 2023, 5:50pm UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/2 "2023-07-25T17:50:54Z")

</div>

Flow control manages write activity; nothing to do with read activity. SELECT’s are read-only and are local to a node. I don’t believe a SELECT query can cause flow control for these reasons.

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [July 26, 2023, 9:00am UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/3 "2023-07-26T09:00:06Z")

</div>

Thanks @matthewb for the detailed information.

How can we find which write query is causing the flow control issue?

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gupta/32/6262_2.png) [@Abhinav\_Gupta](https://forums.percona.com/u/Abhinav_Gupta)\
**Post date:** [July 26, 2023, 2:27pm UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/4 "2023-07-26T14:27:40Z")

</div>

You could explore the [pt-stalk tool](https://docs.percona.com/percona-toolkit/pt-stalk.html), which can collect some details related to the database (processlist, engine status etc) and system once the defined --variable and --threshold conditions are met, like wsrep\_flow\_control\_paused \> 0 or wsrep\_flow\_control\_active is active etc…

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 26, 2023, 2:41pm UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/5 "2023-07-26T14:41:43Z")

</div>

@Naresh9999,  
I recommend you configure [PMM](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/index.html) for each node. This will allow you to track flow control (if that is indeed your issue, PMM will verify this) and correlate it to queries running in your system. Be sure to set long\_query\_time=0 to track all queries.

---

<div class="post-metadata">

**Author:** ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)\
**Post date:** [July 27, 2023, 2:42am UTC](https://forums.percona.com/t/is-it-possible-that-select-queries-will-cause-a-flow-control-issue-for-the-galera-cluster/23898/6 "2023-07-27T02:42:37Z")

</div>

Thanks @matthewb and @Abhinav_Gupta

I’ll do my best to come up with a solution using your suggestions.
