Api stops to work after some calls

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:

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

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.

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

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 :slight_smile:

1 Like