# Got an error writing communication packets

**URL:** <https://forums.percona.com/t/got-an-error-writing-communication-packets/2964>\
**Category:** Other MySQL® Questions\
**Created:** [September 24, 2013, 7:48am UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964 "2013-09-24T07:48:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markbusu](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@markbusu](https://forums.percona.com/u/markbusu)\
**Post date:** [September 24, 2013, 7:48am UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964/1 "2013-09-24T07:48:06Z")

</div>

Hi,

We are currently evaluating some BI software which is attempting to retrieve data from our Percona Database… This is done by running a “select \* from Table”… The size of the table is around 400 Million rows and always seems to be failing once approaching approx 178M … The duration is always approximatly 4:30 - 5 Hours

The error results in:

Aborted connection 178 to db: \*\*\*\* user: \*\*\*\*\*\* host: \*\*\*\*\*\*\*\* (Got an error writing communication packets)

Following numerous documentations, we have updated our values to:

net\_read\_timeout = 120  
interactive\_timeout = 288000  
wait\_timeout = 288000  
innodb\_buffer\_pool\_size = 22G  
max\_allowed\_packet = 1024M

However this yields no result… Does anyone of you have experience with trying to query very large tables ?

Thanks

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [September 24, 2013, 11:39pm UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964/2 "2013-09-24T23:39:08Z")

</div>

check wait\_timeout parameter

---

<div class="post-metadata">

**Author:** ![markbusu](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@markbusu](https://forums.percona.com/u/markbusu)\
**Post date:** [September 25, 2013, 2:02am UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964/3 "2013-09-25T02:02:49Z")

</div>

[COLOR=#252C2F]wait\_timeout parameter has already been increased to 80 hours, query doesn’t last more than 5 hours…

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [September 25, 2013, 3:24am UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964/4 "2013-09-25T03:24:43Z")

</div>

Hi,

Can you provide some more information?

1. Are you using Native MySQL Or Percona Server? If PS then Can you give the exact Percona Server version?
2. “SHOW TABLE STATUS” for that table
3. “SHOW ENGINE INNODB STATUS” while select is running.
4. How your BI software connects to MySQL/PS?

Seems you are selecting data more then max packet size. Also selecting data from this much big table at a time is not a good idea.  
You should select it by running "order by \* limit N,M’.

---

<div class="post-metadata">

**Author:** ![markbusu](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@markbusu](https://forums.percona.com/u/markbusu)\
**Post date:** [November 4, 2013, 4:13am UTC](https://forums.percona.com/t/got-an-error-writing-communication-packets/2964/5 "2013-11-04T04:13:41Z")

</div>

This was fixed by increasing the read\_timeout [COLOR=#252C2F]parameter
