# Api stops to work after some calls

**URL:** https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040
**Category:** Product Support
**Created:** [May 9, 2022, 11:37am UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040 "2022-05-09T11:37:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)
#### Post date: [May 9, 2022, 11:37am UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040/1 "2022-05-09T11:37:32Z")

</div>

**Your software**  
My Mautic version is: 4.2.2  
My PHP version is: 7.4.28  
My Database type and version is: 10.3.34-MariaDB-log-cll-lve

**Your problem**  
My problem is: api stops to work after a few calls.

Hi everone. I have integrated Mautic php API library (using composter) into my cms to sync users with my mautic installation.  
I have several websites where users are registered and every website must sync users data to a single mautic installation.

For example

- www.my-mautic-website.it is where i have mautic installed
- www.website-one.it is a website
- www.website-two.it is another website
- www.website-three.it is another website  
etcetera

I have developed a class that takes user’s data and send it to mautic api. I can call this class manually (for a single user) or automatically (if i want to sync all users)

calls are made via a javascript that recursively calls methods to add/edit users on mautic installation

i noticed that after a few syncs (i don’t know exactly how many syncs) the system stops to work and it seems like i cannot make any other api call manually or automatically because the api returns timeout connection. I tried adding 5 seconds, 10 seconds and it is always the same

thanks

These errors are showing in the log: NO

Steps I have tried to fix the problem:

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [May 9, 2022, 12:13pm UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040/2 "2022-05-09T12:13:31Z")

</div>

Hi, it sounds like your Mautic cannot handle the volume of incoming traffic via API. Is that possible?  
Joey

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [May 9, 2022, 12:17pm UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040/3 "2022-05-09T12:17:10Z")

</div>

following on @joeyk comments what are your server specs ?

We have Mautic running on super heavy traffic sites with hundreds of API calls/minute and all working well.

I would maybe look at the server load to see if there are any resources that are being exhausted.

---

<div class="post-metadata">

### Author: ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)
#### Post date: [May 9, 2022, 12:37pm UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040/4 "2022-05-09T12:37:38Z")

</div>

Hi, thanks for you reply.

I don’t think it is a problem of api traffic because after the development in local machine i made a test on a single website and i was only able to sync 55 users that is a really low number.

also at the moment i’m not able to sync any users, also if i try make a single api call and this have no sense.

Also if i start the sync from another domain it works well, and then it stops to work

i thought that on the webserver there is a kind of black listed domains list, i just wrote to the provider asking for this

---

<div class="post-metadata">

### Author: ![francesco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/francesco/32/82_2.png) [@francesco](https://forum.mautic.org/u/francesco)
#### Post date: [May 9, 2022, 3:08pm UTC](https://forum.mautic.org/t/api-stops-to-work-after-some-calls/24040/5 "2022-05-09T15:08:42Z")

</div>

I have just received a reply from my provider where mautic is hosted, it seems that there is a firewall rules that limits the requests.

i just sent them my domains list, let’s see if i can solve in this way 🙂
