Timeout when publishing Container

About 2MB of data is sent with the requests. this is blocked by the web server.
2MB upload with every statistic ping is definitely not ok. But I don’t know anything about Matomo.
Can you see where the data is coming from? Is there a custom variable that collects too much data?

In the Developer Console you can see a message:

Access to XMLHttpRequest at ‘https://stats.aviloo.com/matomo.php’ from origin ‘https://aviloo.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

But this is only the result of nginx rejecting the POST request because it is too big. In the network tab, the call to matomo.php can be seen in red with the status code 413 (Request Entity too Large). You can also see the entire payload there.

Can anyone help?
Thank you for your time.

What does the request contains (in querystring / in HTTP body)?
Note: CORS is not blocked by server but by browser…

Thanks for reply:) If I understood you correctly with my limited expertise, this does not happen when a request to pull data in a report is made.

The issue is that the tracking is possible only in Preview Mode. After adding the URL parameter at the end of the Page URL we can see the activity in the Visitors Log. Only then. The Version is publish Live and the container is the correct one.

Was the above perhaps a simplified answer? Thanks for the help!

Sometimes, when he timeout is not well configured, the MTM UI let think the version is well published whereas it is not… In this case, the preview version is not the published last version.
In order to be sure, try to create a new version, no change should be visible:


In my case above, There is new changes, then my mast save did not work well. This is due to the timeout setting…

Hi Philippe, thanks for your support. the release is not correctly published. even with 180s timeout, the publish POST does not finish in time. and the changes are not empty.

Is it normal that it takes so long with a lot of tags/triggers? do we need to increase the timeout even more?

If I export the current draft and pretty format the json, its at 12500 lines!
Can I send you the export in a private message? how can I contact you?

I do not belong to the Matomo team…
I just answer on my own experience :wink:
I already encountered such problem.
So is it normal? I don’t know… On our server it takes around 1 minute…
The solution for me was:

  1. Set max_execution_time=0 in the php.ini
  2. Set the same kind of option (long timeout, but maybe not infinite) in Apache… I don’t remember how much it has been set on our server (I have no access to this config), but I know that it is long enough… Maybe 3 or 5 minutes?

Even with 10min. timeout it still run into it.

How many variables / triggers / tags?

226 Tags & 277 Triggers

Here’s the full exported draft pretty formatted: https://pastebin.com/R5J6XEWN

@Lukas, does MTM support such container?

I’m pretty sure the too large request is caused by Heatmap/Sessionrecording and unrelated to Tag Manager, so I renamed this thread to be about the timeout during the publishing instead.

I have seen that too in https://github.com/matomo-org/tag-manager/issues/332 and in one MatomoCamp talk (timestamp: https://video.matomocamp.org/w/34s6TgxQTWwsAQaqwHBv3U?start=17m14s)

Thank you @Lukas for all your support! I appreciate it. :slight_smile:

FYI:

@thomas_matomo found the issue and it should be fixed with

1 Like