# Output Too Big Exception

**URL:** <https://community.hubspot.com/t/output-too-big-exception/33893>\
**Category:** CMS Development\
**Tags:** developer\
**Created:** [March 15, 2021, 4:25pm UTC](https://community.hubspot.com/t/output-too-big-exception/33893 "2021-03-15T16:25:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [March 15, 2021, 4:25pm UTC](https://community.hubspot.com/t/output-too-big-exception/33893/1 "2021-03-15T16:25:15Z")

</div>

When creating custom modules, has anyone come across this error before?

**OutputTooBigException: 10005785 byte output rendered, over limit of 10000000 bytes**

I had no idea there was a file size limit to custom modules!

I’m creating a new custom module that references a big HubDB table (over 580 rows and growing) and because of the size, I have embedded various conditions / lightboxes / filters etc!  
This error is stopping me adding the final conditions to the page or finishing the styling.  
Any help would be appreciated.

 ![39490i3A15E72D0A009B2C.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/0/10c38f53439728394c1da591341caf0ef41466c6.jpeg)

---

<div class="post-metadata">

**Author:** ![mike-ward](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike-ward/32/26595_2.png) [@mike-ward](https://community.hubspot.com/u/mike-ward)\
**Post date:** [March 16, 2021, 11:09am UTC](https://community.hubspot.com/t/output-too-big-exception/33893/2 "2021-03-16T11:09:57Z")

</div>

Hi @ben-duchy ,

I also didn’t know there was a size limit! But if I’m reading it right, that size limit is **10 MB**. That seems like a lot!

I’d check you don’t have any bugs in any loops in your code that are re-rendering things many times more than they should.

Otherwise… maybe you could break up the module into smaller sub-modules?

If you can share more of the code here, maybe someone can advise in more detail - otherwise I’d raise a ticket with support and let someone take a more in-depth look.

Cheers,

Mike

---  
_Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange ‘Reply’ button!_

---

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [March 16, 2021, 11:16am UTC](https://community.hubspot.com/t/output-too-big-exception/33893/3 "2021-03-16T11:16:09Z")

</div>

Hi @mike-ward,

You’re absolutely right, just this minute I found a couple of bugs in the code that was trying to loop everything x5 so it was struggling and maxing out.
