# xojo.net.HTTPSocket Max Concurrent

**URL:** <https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645>\
**Category:** General\
**Created:** [July 31, 2019, 10:12am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645 "2019-07-31T10:12:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveP](https://forum.xojo.com/user_avatar/forum.xojo.com/stevep/32/6872_2.png) [@SteveP](https://forum.xojo.com/u/SteveP)\
**Post date:** [July 31, 2019, 10:12am UTC](https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645/1 "2019-07-31T10:12:34Z")

</div>

Hi,

Win 10 r18.4

I have some code that pulls in a recordset from an sqlite database. Now I want, when looping through the recordset, take info from each record and submit an API request. I chose xojo.net.httpsocket as I found some example code and I liked the fact that it is asynch.

The recordset would likely have say 300 rows in it. If I try to run the code through all of the recordset, creating a new net.httpsocket subclass instance on each one, there seems to be a limit. Currently I have tried LIMIT 110 in my sql which works but up at 140 or 150 fails. Any idea on a constraint on ‘concurrency’ ?

I noted this [link](https://forum.xojo.com/44114-xojo-net-httpsocket-multiple-use/0) - would the advice to push requests into timer loop be a pragmatic way to do this ? Is there a better alternative without re-writing large portions of my code ?

TIA

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [July 31, 2019, 9:14pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645/2 "2019-07-31T21:14:46Z")

</div>

It may be that the API you’re calling is limiting the number of requests per minute, so a timer queue may be the best option.

---

<div class="post-metadata">

**Author:** ![SteveP](https://forum.xojo.com/user_avatar/forum.xojo.com/stevep/32/6872_2.png) [@SteveP](https://forum.xojo.com/u/SteveP)\
**Post date:** [July 31, 2019, 9:44pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645/3 "2019-07-31T21:44:59Z")

</div>

Thanks Tim. I should have been more clear - the Xojo desktop app freezes and becomes completely unresponsive.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:02pm UTC](https://forum.xojo.com/t/xojo-net-httpsocket-max-concurrent/49645/4 "2021-04-29T16:02:22Z")

</div>


