# MySQL "Procedure does not exist" failures

**URL:** <https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686>\
**Category:** MySQL & MariaDB\
**Tags:** mysql, percona\
**Created:** [March 10, 2022, 7:20am UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686 "2022-03-10T07:20:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.percona.com/u/Tom)\
**Post date:** [March 10, 2022, 7:20am UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/1 "2022-03-10T07:20:38Z")

</div>

We migrated our servers from RHEL 6 running Percona MySQL 5.5.35 to RHEL 7 running Percona MySQL 8.0.26. On our RHEL 7 servers we are seeing 10 to 30 warnings per day in our application logs similar to the following message:

2022-02-24 22:15:09,763 w 140041653294:MySQLCommand::HandleException: Executing cmd=“”, error=“PROCEDURE … does not exist”. queryTime=1ms, timeout=20, connected=1, disconnects=51, p=CC2A4CB0.  
2022-02-24 22:15:09,791 w 140041653294:MySQLCommand::Attempt: After previous failure, success on attempt (2) while executing cmd=“”. disconnects=51, p=CC2A4CB0.

On our legacy RHEL 6 stack running Percona 5.5.35 we seldom saw this error. Our procedures are defined and never changing. We call procedures around 500 times per second.

Questions:  
Why are we getting occasional “Procedure does not exist” failures?  
What can be done to address the root cause of the occasional “Procedure does not exist” failures?

---

<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:** [March 10, 2022, 2:55pm UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/2 "2022-03-10T14:55:29Z")

</div>

How exactly did you migrate from MySQL 5.5 to MySQL 8? You cannot simply uninstall 5.5 and install 8. You must follow the upgrade paths as laid out in the documentation. MySQL 8 introduced a data dictionary which is where stored procedures are located. Perhaps this action failed during your upgrade.

---

<div class="post-metadata">

**Author:** ![Tom](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.percona.com/u/Tom)\
**Post date:** [March 10, 2022, 9:58pm UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/3 "2022-03-10T21:58:32Z")

</div>

Hey, thanks for the reply. We did not upgrade in place or try to migrate the existing DB files between versions. We are starting new servers with RHEL 7 (fresh install) and Percona 8.0.26 (we did not attempt to convert MySQL 5.5.7 to 8.0.26) and the numbers of entries in the tables grow as we add users and data to the server. The errors don’t seem load dependent as they happen at all hours of the day and night and our servers get more load during working hours.

---

<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:** [March 11, 2022, 4:05pm UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/4 "2022-03-11T16:05:24Z")

</div>

Have you tried SHOW CREATE PROCEDURE to even see if it exists?

---

<div class="post-metadata">

**Author:** ![Tom](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.percona.com/u/Tom)\
**Post date:** [March 14, 2022, 2:18pm UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/5 "2022-03-14T14:18:41Z")

</div>

It succeeds on a retry. See log message below:

2022-02-24 22:15:09,763 w 140041653294:MySQLCommand::HandleException: Executing cmd=“”, error=“PROCEDURE … does not exist”. queryTime=1ms, timeout=20, connected=1, disconnects=51, p=CC2A4CB0.  
2022-02-24 22:15:09,791 w 140041653294:MySQLCommand::Attempt: After previous failure, **success** on attempt (2) while executing cmd=“”. disconnects=51, p=CC2A4CB0.

---

<div class="post-metadata">

**Author:** ![Tom](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tom](https://forums.percona.com/u/Tom)\
**Post date:** [April 11, 2022, 6:16pm UTC](https://forums.percona.com/t/mysql-procedure-does-not-exist-failures/14686/6 "2022-04-11T18:16:22Z")

</div>

Any one have any thoughts as why we are seeing a “Procedure does not exist error” on the initial call but succeeds on a retry? These are procs in our schema.
