# Max number of particle.functions

**URL:** <https://community.particle.io/t/max-number-of-particle-functions/55810>\
**Category:** Firmware\
**Created:** [April 22, 2020, 4:27pm UTC](https://community.particle.io/t/max-number-of-particle-functions/55810 "2020-04-22T16:27:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_dM](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jan\_dM](https://community.particle.io/u/Jan_dM)\
**Post date:** [April 22, 2020, 4:27pm UTC](https://community.particle.io/t/max-number-of-particle-functions/55810/1 "2020-04-22T16:27:27Z")

</div>

It was not until now that I doscovered in the Photon documentation that "Up to 15 cloud functions may be registered…  
However: in one of my applications I have registered as many as 18 particle.functions(), and they all seem to work just fine.  
Is the limitation to 15 as "hard"as it is stated in the documentation?  
Might 18 functions in the end behave instable, faulty or whatever?  
Or is this limit of 15 no longer valid and does the documentation need to be adapted?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [April 22, 2020, 5:02pm UTC](https://community.particle.io/t/max-number-of-particle-functions/55810/2 "2020-04-22T17:02:01Z")

</div>

It’s not a hard limit of 15. It’s probably best to not exceed 15 because the limit could be enforced in a future version of Device OS.

There is an actual limit, but it depends on the length of the function names, which is why you were able to get 18 to work.

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [April 22, 2020, 5:12pm UTC](https://community.particle.io/t/max-number-of-particle-functions/55810/3 "2020-04-22T17:12:35Z")

</div>

@Jan_dM, in most of my projects I use a single Particle.function() which accepts a structured command set which I parse (and act on) in the function callback. This allows me to expand the command set easily, only having to update the parser and action functions. Typically, the command parser is designed to be called from functions receiving data from Serial, TCP or UDP, etc, making it even more portable!

---

<div class="post-metadata">

**Author:** ![Jan\_dM](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jan\_dM](https://community.particle.io/u/Jan_dM)\
**Post date:** [April 23, 2020, 6:44am UTC](https://community.particle.io/t/max-number-of-particle-functions/55810/4 "2020-04-23T06:44:20Z")

</div>

Yes, I do understand what you mean. But you know how things evolve: starting with a few functions and then you think of again adding something, and then again… Certainly not the way to end up in a well strucured program.  
And I was just wondering if I would run into any risk with these 18 functions, because they all seemed to work fine.  
Anyhow, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [October 22, 2020, 6:44pm UTC](https://community.particle.io/t/max-number-of-particle-functions/55810/5 "2020-10-22T18:44:22Z")

</div>

Closed on October 22, 2020, 6:44pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
