New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add system check if opcache and xcache is active: PHP Fatal error: Cannot redeclare class since v2.16.2 #10378
Comments
From which version did you update and how did you update? On what operating system is that? |
I don't remember the exact version, it was the latest stable release before this one. And I ran the built-in updater in the Piwik UI, all steps until completion and without any errors. Environment: |
Btw, database size is 992.4 MB according to Piwik settings. Edit: |
Follow up: when I disable all caching in [Cache]
backend = "null" Edit: |
That's really weird. Is there any chance that we can get access to your server? If so please send us an email to hello at piwik.org and leave a comment here afterwards as it might go to spam. Maybe also try to remove files in tmp |
Removing the tmp files and then forced rearchive appears to be the solution. There are no
Took a long time to complete, but now the issue appears to be resolved. I checked the permissions before deleting the Interesting to note is that the response time to clicks has improved a lot! It's near instant even on large reports. |
Re the instant loading times maybe it's also related to http://piwik.org/docs/setup-auto-archiving/ in case this is not activated it will improve loading time a lot. Maybe Piwik had no permission to reset some caches or something else happened. I still cannot really explain it but happy it works now. Can we close this issue? |
I already had auto archiving with cron. Anyways, thanks a lot for the hints and yes you can close the issue. |
@tsteur After 3 days without any trouble the problem returned, similar to before.
Piwik
Server
|
Okay weird, it appears the sudo find . -type f -exec chmod 0660 {} \;
sudo find . -type d -exec chmod 0770 {} \; Edit: (6:18) |
Is it possible that we get access to that server?
It depends, if possible I'd increase it but it depends how much traffic your sites get. It shouldn't cause such an error though.
This sounds a bit weird, it shouldn't change by random. Maybe there are different processes running or something must be causing this. Have you installed from the zip download from our website or from git? Which version of PHP 5.6 is it? |
For the record: I seem to be having very similar problems after the upgrade to the latest version. Mine is a tiny installation (only 50-100 hits/day since the beginning of this year). Piwik is running on virtual Turnkey Linux with PHP Version 5.6.24-0+deb8u1 |
Update: I think I found a solution: xcache seems to be the problem. Since then I have not seen the 'redeclare class' again, Piwik is working fine. Nevertheless it is something you might want to investigate. XCache is very common. |
@fvdm can you confirm you are using xcache as well? We would need to check if there were any changes re xcache. |
@tsteur Ah yes of course, I have I disabled @glipman Do you perhaps also have multiple caches enabled in PHP? |
Indeed, in my installation opcache was enabled as well. In the end I believe Piwik is doing nothing wrong and no software change is required. Adding an entry to installation FAQ might be an idea though. |
I'm still curious what caused the problem in Piwik only since the update. Other apps like Wordpress don't have a problem with the mixed caches. Edit: re the changing permissions, it was my server-wide security script that was a little too aggressive. |
I had a look through the changes but don't know what it causes, maybe an update of a library. We would probably simply recommend to have only one cache active in general and I would say we add a system check for it. I will update the title to add a system check |
Addition to the System Check would be great. |
Sadly the problem just returned. Nothing has changed on my server except for disabling
So it's not in the caching. 😞 |
Hi @fvdm just a basic check: did you try to restart your webserver? |
I'll get to the bottom of this. Right now Piwik is working perfectly normal somehow, while nothing has changed except for new tracking input. When I have time I shall move Piwik to its own PHP process so I can revert the php.ini to all defaults and disable all extensions. Debug step by step. |
Alright I found the problem, there was yet another cacher enabled in one of the included ini's! What a mess, I'm completely rebuilding the server now to avoid these kind of issues in the future. Five years of patches and tweaks stacked upon eachother. My guess is the Piwik update did change something in a good way, more adhering to modern standards or the like, which caused the ancient code higher up the chain to finally break. Issue resolved! |
Thank you for letting us know. I still think a system check would be good for usability in case something like this happens again. It's an edge case but easy to implement. |
@fvdm what was the third cache that you had enabled? |
@mattab Sorry, I forgot about this. The other one was APCu. Although opcache and apcu should have worked great together. It probably was a rogue config somewhere, maybe cache expiry not well aligned. The new ssd server is running so great using only opcache, I even managed to downgrade the VPS to 4GB ram and 3 cpu cores. 💰 |
Thanks for contributing to this issue. As it has been a few months since the last activity and we believe this is likely not an issue anymore, we will now close this. If that's not the case, please do feel free to either reopen this issue or open a new one. We will gladly take a look again! |
Since I updated Piwik to v2.16.2 the installation is unstable.
In the logs I get:
What I attempted to resolve this issue:
I have no 3rd party plugins or themes installed.
When I disable the UserLanguage plugin with
./console plugin:deactivate UserLanguage
the All Websites dashboard returns a Piwik error (red box) suggesting to contact myself and in the logs I see:Then I enable the plugin and at first everything is still broken until the cronjob runs
./console core:archive
and somehow all dashboards, stats, graphs everything seems ok. But a minute later the first graphs on a website dashboard fail to load, producing error:For
Eventually hours later the whole Piwik installation is broken again.
The text was updated successfully, but these errors were encountered: