[Kinda SOLVED] API requests fail over a month


#1

Hello,

We’re running a 60k visits-per-month website and we track some URLs to print charts to our customers (like a url-shortener).

My problem is that when requesting analytics over a month (sometimes less, sometimes more) the request fail with a 500 error.

I upgraded our PHP config for memory limit and script duration, now the only error I see in the log is a ‘segmentation fault’. What would be the source of this problem ? Is that related to Piwik efficiency and should I try to optimize it again ?
I have already enabled auto-archiving.

(this might be related : from the piwik web interface we can’t print any charts, it fails with Piwik printing a vanishing orange error).

Also,
I am willing to try a new solution : setting a new website per customer (I mean, piwik website). In case my problem comes from a lack of optimization, ŵould having several websites help ? Is that a good idea to create many websites (hundreds).

Kind regards,
Alexis.


#2

I kind of solved my problem by disabling the garbage collector, but I also had to allow 2GB of memory to PHP. It still takes up to two minutes to complete the request.

I guess I will have to go into deeper optimizations sooner or later :).

Thanks anyway, Piwik is quite enjoyable !


(Matthieu Aubry) #3

Please setup: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
then requesting data will be fast


#4

Hello

Thanks for your answer,
Sorry matt, I had already done that and this has not fasten things up. The delay is acceptable though, but sometimes goes over 5 seconds.


(Matthieu Aubry) #5

5 seconds to load the pre-archived data? it seems really slow. Would you be able to install a profiler to learn more, such as XHProf?


#6

I will have a look into this, though I am not used to working with PHP. I will come back to you next week once I’ll have inspected the results.

I hope the HTML GUI is easy to use :).

Thanks a lot