<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF_ERROR_INVALID_LENGTH on BLE Advertising Startup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102424/nrf_error_invalid_length-on-ble-advertising-startup</link><description>I am getting the following error periodically whenever I start my BLE application. I would say this happens 1 time out of every 10. 
 
 &amp;lt;error&amp;gt; app: ERROR 9 [NRF_ERROR_INVALID_LENGTH] at C:\SVNRepo\ISSPRO 6279\EV3 SpeedoTach nRF52 Executable\Nordic_SDK_17</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Aug 2023 11:36:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102424/nrf_error_invalid_length-on-ble-advertising-startup" /><item><title>RE: NRF_ERROR_INVALID_LENGTH on BLE Advertising Startup</title><link>https://devzone.nordicsemi.com/thread/439238?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2023 11:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2725954f-084e-4d34-b48b-07bd1f3af66c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I looks like you need to increase the app scheduler&amp;#39;s element size and/or amount. See&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__app__timer__config.html#ga3cae0236c8e963755ec625e44d5b71be"&gt;APP_TIMER_CONFIG_OP_QUEUE_SIZE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I suggest you set the APP_TIMER_WITH_PROFILER config flag and monitor &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__app__timer.html?cp=9_1_6_10_54_20#ga565f5b5c530dfc52c45d79c12f6615be"&gt;app_timer_op_queue_utilization_get&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also try to increase &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__app__timer.html?cp=9_1_6_10_54_11#ga76c7bd6b9154233152895f00fe226709"&gt;APP_TIMER_SCHED_EVENT_DATA_SIZE&lt;/a&gt;&lt;span&gt;&amp;nbsp;if the above solution does not work.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>