# Max\_allowed\_packet error

**URL:** <https://discuss.elastic.co/t/max-allowed-packet-error/52293>\
**Category:** Elasticsearch\
**Created:** [June 9, 2016, 7:19am UTC](https://discuss.elastic.co/t/max-allowed-packet-error/52293 "2016-06-09T07:19:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [June 9, 2016, 7:19am UTC](https://discuss.elastic.co/t/max-allowed-packet-error/52293/1 "2016-06-09T07:19:44Z")

</div>

Hi,

I want to do index mysql data with ES(2.3.3). I am using Mysql and php platform now.  
My data size is 600.000.000 and I can't do index. My error:

`Got a packet bigger than 'max_allowed_packet' bytes`

I changed max\_allowed\_packet=1G in my.cnf but it didn't index.

What can I do? how much indexed data limit should be ? Is there such a limit?

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 9, 2016, 7:49am UTC](https://discuss.elastic.co/t/max-allowed-packet-error/52293/2 "2016-06-09T07:49:43Z")

</div>

This is a MySQL question in Elasticsearch discussion, you can not expect many answers.

Consider the following:

- the data size has nothing to do with `max_allowed_packet`. There is no practical limit.
- the default `max_allowed_packet` can be viewed with `show variables like 'max_allowed_packet'` in MySQL client.
- Increase number carefully. A number too high will have massive impact on your system, it will not work any more. Maximum should be around `16M`. `1G` is much too high.
- you have to change it on both client and server. Check MySQL documentation how to do that [https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html](https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html)

---

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [June 9, 2016, 7:54am UTC](https://discuss.elastic.co/t/max-allowed-packet-error/52293/3 "2016-06-09T07:54:38Z")

</div>

Sorry, you are right.  
Thank you .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:45pm UTC](https://discuss.elastic.co/t/max-allowed-packet-error/52293/4 "2017-07-05T22:45:06Z")

</div>


