# Maximum allowed rows

**URL:** <https://community.hubspot.com/t/maximum-allowed-rows/29791>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [January 6, 2021, 4:01pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791 "2021-01-06T16:01:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron\_at\_BRCC](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ron_at_brcc/32/59606_2.png) [@Ron\_at\_BRCC](https://community.hubspot.com/u/Ron_at_BRCC)\
**Post date:** [January 6, 2021, 4:01pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/1 "2021-01-06T16:01:58Z")

</div>

Hello, I’ve been posting a larger file ok many times, however, I am now just getting this error message:

Too many rows detected",“code”:“TOO\_MANY\_ROWS”,“context”:{“maximumAllowedRows”:[“500000”]

How do I fix? We have way more than 500k customers, I dont want to split into many posts.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [January 6, 2021, 10:26pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/2 "2021-01-06T22:26:01Z")

</div>

Hey [@Ron\_at\_BRCC](https://community.hubspot.com/t5/user/viewprofilepage/user-id/143670)

Could you confirm what endpoint you are posting to?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [January 8, 2021, 2:23pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/3 "2021-01-08T14:23:56Z")

</div>

Hey [@Ron\_at\_BRCC](https://community.hubspot.com/t5/user/viewprofilepage/user-id/143670)

Assuming that you are referencing importing contacts(Was pretty sure you were, but wanted verification), we recently fixed a bug that was accidentally allowing unlimited size imports which had the potential to cause reliability issues. The limits for imports are listed in [this kb article](https://knowledge.hubspot.com/crm-setup/set-up-your-import-file). We are allowing double the documented limit for API imports. You will need to split your import into multiple calls.

---

<div class="post-metadata">

**Author:** ![Ron\_at\_BRCC](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ron_at_brcc/32/59606_2.png) [@Ron\_at\_BRCC](https://community.hubspot.com/u/Ron_at_BRCC)\
**Post date:** [January 11, 2021, 3:11pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/4 "2021-01-11T15:11:53Z")

</div>

Thanks Dennis, yes it is a contact import.

Surely there is a workaround? I will have to split into several calls. And I’m sure there are larger companies that have many millions of customers… what are they doing?

thanks

Ron

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [January 11, 2021, 4:50pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/5 "2021-01-11T16:50:49Z")

</div>

@lynton , @himanshurauthan

What is your typical strategy for large imports?

---

<div class="post-metadata">

**Author:** ![lynton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lynton/32/31184_2.png) [@lynton](https://community.hubspot.com/u/lynton)\
**Post date:** [January 11, 2021, 8:08pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/6 "2021-01-11T20:08:40Z")

</div>

[@Ron\_at\_BRCC](https://community.hubspot.com/t5/user/viewprofilepage/user-id/143670) we’ve faced similar issues with these errors. Our best workaround is an automated process to generate multiple smaller files that the HubSpot API will accept. We check each file for the row size, and split the file into multiple smaller files if it’s under the limit.

---

<div class="post-metadata">

**Author:** ![Ron\_at\_BRCC](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ron_at_brcc/32/59606_2.png) [@Ron\_at\_BRCC](https://community.hubspot.com/u/Ron_at_BRCC)\
**Post date:** [January 12, 2021, 2:48pm UTC](https://community.hubspot.com/t/maximum-allowed-rows/29791/7 "2021-01-12T14:48:39Z")

</div>

OK thank you.
