Piwik.php first visit logging call taking 4 seconds or more

Hi,

Can anyone suggest solution to following problem:

Piwik is working great but now we have been noticing that first piwik.php visit logging call taking 4 seconds and above but after the first visit it is taking time in milliseconds.

Why is this difference and how it can be minimized.
we are noticing this by using firfox firbug.

Kind Regards
Saqib Ali

See 301 Moved Permanently

Hi matt,

I am facing the same issue. First logging request taking about 5 seconds and next time 50 millisecond. Can you help how to improve this performance. I have tried by disabling the report archiving but same delay.
Is there any other scheduled task that I can disable.

Regards,
Faisal

Hello,

I have disabled report archiving but still getting 5 seconds response time on first request. any idea?

Regards,
Faisal

It should take 5 seconds only in the first request of the day or the hour.
Also see: Optimize and Scale Piwik - Analytics Platform - Matomo

also enabel PHP cache

Hi Matt,

I have debugged the code and found Provider plugin is taking 4.5 seconds to get the ISP name. Is there any performance issue with this plugin?

Regards,
Faisal

Yes it does a reverse DNS lookup which can be slow if your DNS server is slow. you may disable the Provider plugin.

Thanks Matt.

This helped me a lot.

Cool, i also update the user guide: How to configure Piwik for speed - Analytics Platform - Matomo

and noted: [quote=“user guide”]
Alternatively, for optimal performance you may disable the Provider plugin and skip the potentially slow reverse DNS lookup.
[/quote]

Hi Matt,

Piwik.php request first logging is taking some 10sec, as per the discussion , disabled Provider plugin but still the same issue, kindly suggest.

Thanks,

can you enable debug messages: Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

and paste here the output?

Hi kkbtech ,

Have you enabled php cache…?

Regards,
Saqib