# ProxySQL Admin Tool should handle parallel calls more robust

**URL:** <https://forums.percona.com/t/proxysql-admin-tool-should-handle-parallel-calls-more-robust/39335>\
**Category:** Percona XtraDB Cluster 8.x\
**Tags:** bugs\
**Created:** [September 11, 2025, 8:19am UTC](https://forums.percona.com/t/proxysql-admin-tool-should-handle-parallel-calls-more-robust/39335 "2025-09-11T08:19:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiskele](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kiskele](https://forums.percona.com/u/kiskele)\
**Post date:** [September 11, 2025, 8:19am UTC](https://forums.percona.com/t/proxysql-admin-tool-should-handle-parallel-calls-more-robust/39335/1 "2025-09-11T08:19:46Z")

</div>

Percona XtraDB Operator calls `proxysql-admin –syncusers –add-query-rules` every 5 seconds.

proxysql-admin begins with calling

```auto
proxysql_exec "$LINENO" "SAVE MYSQL SERVERS FROM RUNTIME"
proxysql_exec "$LINENO" "SAVE MYSQL QUERY RULES FROM RUNTIME"
proxysql_exec "$LINENO" "SAVE MYSQL USERS FROM RUNTIME"
proxysql_exec "$LINENO" "SAVE MYSQL VARIABLES FROM RUNTIME"

```

This leads to reverting configuration changes every 5 seconds. Why is it necessary? ProxySQL Admin should call `LOAD MYSQL SERVERS TO RUNTIME` immediately after any `mysql_servers` change and RUNTIME should not differ from MEMORY table.

---

<div class="post-metadata">

**Author:** ![kiskele](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kiskele](https://forums.percona.com/u/kiskele)\
**Post date:** [September 12, 2025, 6:30am UTC](https://forums.percona.com/t/proxysql-admin-tool-should-handle-parallel-calls-more-robust/39335/2 "2025-09-12T06:30:14Z")

</div>

```auto
        # Update the write_node to have a higher priority
        proxysql_exec "$LINENO" \
          "UPDATE mysql_servers
            SET weight = 1000000
            WHERE
              hostname = '$writer_ws_ip' AND
              port = $writer_ws_port AND
              hostgroup_id = $WRITER_HOSTGROUP_ID;"
        check_cmd $? "$LINENO" "Failed to update the writer-node" \
                             "\n-- Please check the ProxySQL connection parameters and status."

```

This part seems to be unnecessary, because max\_writers=1 is set in mysql\_galera\_hostgroups too. And it has a negative side-effect, that weight=1000000 is cloned by ProxySQL when it is copying nodes from writer to reader hostgroup.

When I remove the UPDATE mentioned above, the node config will be correct:

```auto
+--------------+-------------------------------------------------+---------+--------+
| hostgroup_id | hostname | status | weight |
+--------------+-------------------------------------------------+---------+--------+
| 10 | mysql-pxc-0.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
| 10 | mysql-pxc-1.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
| 10 | mysql-pxc-2.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
| 11 | mysql-pxc-0.mysql-pxc.kiskele.svc.cluster.local | SHUNNED | 1000 |
| 11 | mysql-pxc-1.mysql-pxc.kiskele.svc.cluster.local | SHUNNED | 1000 |
| 11 | mysql-pxc-2.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
| 12 | mysql-pxc-0.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
| 12 | mysql-pxc-1.mysql-pxc.kiskele.svc.cluster.local | ONLINE | 1000 |
+--------------+-------------------------------------------------+---------+--------+

```

---

<div class="post-metadata">

**Author:** ![yunus.uyanik](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus.uyanik/32/19250_2.png) [@yunus.uyanik](https://forums.percona.com/u/yunus.uyanik)\
**Post date:** [September 25, 2025, 5:45am UTC](https://forums.percona.com/t/proxysql-admin-tool-should-handle-parallel-calls-more-robust/39335/3 "2025-09-25T05:45:09Z")

</div>

Hi @kiskele

I could not find any bug report like this. I would like to suggest you please create a bug report for this along with a small demonstration with logs, etc. Our development team will review it and work on this if it’s an issue.
