# PT- Archiver Error

**URL:** <https://forums.percona.com/t/pt-archiver-error/30482>\
**Category:** MySQL & MariaDB\
**Tags:** community, percona, mysql\
**Created:** [May 22, 2024, 7:30am UTC](https://forums.percona.com/t/pt-archiver-error/30482 "2024-05-22T07:30:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkb](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkb](https://forums.percona.com/u/bkb)\
**Post date:** [May 22, 2024, 7:30am UTC](https://forums.percona.com/t/pt-archiver-error/30482/1 "2024-05-22T07:30:08Z")

</div>

Hi,  
Getting below error from PT-Archiver…

Exhausted retries while deleting; rolling back 0 rows can’t call method “rollback” on an undefined value at /bin/pt-archiver line 7185.

Please suggest !!

---

<div class="post-metadata">

**Author:** ![Denis\_Subbota](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/denis_subbota/32/23607_2.png) [@Denis\_Subbota](https://forums.percona.com/u/Denis_Subbota)\
**Post date:** [May 27, 2024, 2:06pm UTC](https://forums.percona.com/t/pt-archiver-error/30482/2 "2024-05-27T14:06:26Z")

</div>

Hello BKB,  
Could you please provide more information, such as the command you ran at the time of issue?

Regards,  
Denis Subbota.  
Managed Services, Percona.

---

<div class="post-metadata">

**Author:** ![bkb](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkb](https://forums.percona.com/u/bkb)\
**Post date:** [May 28, 2024, 4:43am UTC](https://forums.percona.com/t/pt-archiver-error/30482/3 "2024-05-28T04:43:27Z")

</div>

Hi Denis,

Thanks !!

The issue have been resolved now using increasing the retry settings.

---

<div class="post-metadata">

**Author:** ![bkb](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkb](https://forums.percona.com/u/bkb)\
**Post date:** [May 28, 2024, 7:17am UTC](https://forums.percona.com/t/pt-archiver-error/30482/4 "2024-05-28T07:17:36Z")

</div>

Hi Denis,

Good Morning !!

Thanks for your support PT Archiver error we faced earlier and resolved and informed you in previous emails.

We are getting error below for PT Archiver of different table.

Unicode non-character U+FFFF is illegal for open interchange at /bin/pt-archiver line 6923.

Any thought please share how to fix this error.

---

<div class="post-metadata">

**Author:** ![SumitKumar](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@SumitKumar](https://forums.percona.com/u/SumitKumar)\
**Post date:** [June 4, 2024, 5:47pm UTC](https://forums.percona.com/t/pt-archiver-error/30482/5 "2024-06-04T17:47:22Z")

</div>

Hi @Denis_Subbota ,

Any update ?

---

<div class="post-metadata">

**Author:** ![Denis\_Subbota](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/denis_subbota/32/23607_2.png) [@Denis\_Subbota](https://forums.percona.com/u/Denis_Subbota)\
**Post date:** [June 5, 2024, 6:30am UTC](https://forums.percona.com/t/pt-archiver-error/30482/6 "2024-06-05T06:30:38Z")

</div>

You can try to add --charset=UTF8 flag for your command

---

<div class="post-metadata">

**Author:** ![SumitKumar](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@SumitKumar](https://forums.percona.com/u/SumitKumar)\
**Post date:** [June 5, 2024, 5:43pm UTC](https://forums.percona.com/t/pt-archiver-error/30482/7 "2024-06-05T17:43:07Z")

</div>

@Denis_Subbota As per suggestion , we used --charset=utf8 but same error . Please find below script

pt-archiver --source h=localhost,u=$USERNAME,p=$PASSWORD,D=$DATABASE,t=$TABLE --where ‘AUDIT\_DATE \<(NOW() - INTERVAL 240 DAY)’ --charset=utf8 --limit=5000 --commit-each --file ${ARCHIVAL\_PATH}/%Y-%m-%d-%D.%t 2\>\> $LOGPATH/arch\_cp.err

---

<div class="post-metadata">

**Author:** ![SumitKumar](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@SumitKumar](https://forums.percona.com/u/SumitKumar)\
**Post date:** [June 6, 2024, 5:49am UTC](https://forums.percona.com/t/pt-archiver-error/30482/8 "2024-06-06T05:49:35Z")

</div>

@Denis_Subbota , Requesting …for an update please

---

<div class="post-metadata">

**Author:** ![Denis\_Subbota](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/denis_subbota/32/23607_2.png) [@Denis\_Subbota](https://forums.percona.com/u/Denis_Subbota)\
**Post date:** [June 6, 2024, 7:20am UTC](https://forums.percona.com/t/pt-archiver-error/30482/9 "2024-06-06T07:20:07Z")

</div>

The error you’re encountering, “Unicode non-character U+FFFF is illegal for open interchange,” indicates that the data you are trying to archive includes an invalid Unicode character (U+FFFF), which is not allowed in standard Unicode interchange. This character may have been introduced inadvertently and needs to be handled appropriately.

Here are some steps and suggestions to help you fix this issue:

1. Identify the Problematic Data

First, identify which rows contain the illegal Unicode character. You can run a query to find any rows containing the U+FFFF character:

```auto
SELECT * 
FROM your_table 
WHERE your_column LIKE CONCAT('%', CHAR(0xFFFF), '%');

```

Replace your\_table and your\_column with the appropriate table and column names.  
2. Clean the Data

Once you identify the rows with the problematic character, you can either clean or remove the character. To clean the data, you can update the column to remove or replace the character. For example, to remove U+FFFF:

```auto
UPDATE your_table 
SET your_column = REPLACE(your_column, CHAR(0xFFFF), '')
WHERE your_column LIKE CONCAT('%', CHAR(0xFFFF), '%');

```

1. Modify the pt-archiver Command

If the problematic data cannot be cleaned easily, you can modify your pt-archiver command to handle such cases. Ensure that your charset setting matches your database’s character set. Additionally, you might need to handle such characters programmatically or through additional preprocessing steps before running pt-archiver.  
4. Use Character Encoding Properly

Make sure that the character encoding you are using in pt-archiver matches the database encoding. In your case, you have already tried --charset=utf8. If the issue persists, it might be due to the encoding mismatch.  
Example pt-archiver Command

Here’s your pt-archiver command with the suggested flag for charset:

`pt-archiver --source h=localhost,u=$USERNAME,p=$PASSWORD,D=$DATABASE,t=$TABLE --where 'AUDIT_DATE < (NOW() - INTERVAL 240 DAY)' --charset=utf8 --limit=5000 --commit-each --file ${ARCHIVAL_PATH}/%Y-%m-%d-%D.%t 2>> $LOGPATH/arch_cp.err`

If the error persists, you may need to:

```
Verify Database Charset: Ensure your MySQL database and tables are set to use the correct character set (UTF-8).

```

```auto
SHOW VARIABLES LIKE 'character_set%';
SHOW TABLE STATUS WHERE Name = 'your_table';

```

```
Update MySQL Configurations: If needed, update the MySQL configuration to enforce the correct charset.

```

1. Additional Considerations

Feel free to reach out if you need further assistance.
