Skip to content
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

Update screen: advise to disable apache while upgrading #2175

Closed
mattab opened this issue Mar 11, 2011 · 8 comments
Closed

Update screen: advise to disable apache while upgrading #2175

mattab opened this issue Mar 11, 2011 · 8 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Mar 11, 2011

As to prevent errors, it is actually important to disable all tracking requests while the DB is upgrading (indexes deleted, created, etc.).

We should mention this clearly when printing out the command line to upgrade via shell (users that update via the UI don't need to disable their tracking since the DB size is probably small).

This tip was given by a Piwik user tracking 2 million visits per month, for whom update failed because tracking was still enabled, after stopping apache all went smoothly.

This ticket is probably

  • updating screen Update in product, to explain to disable apache while running script
  • Mention this in the online Update documentation as well
@anonymous-matomo-user
Copy link

In my opinion disabling Apache isn't a solution. For example when the website and piwik installation are on the same server. Disabling Apache would mean that the website isn't accessible. Couldn't there be a way to integrate an upgrade mode into piwik where request are ignored but no error is thrown? This would be very helpful for updating piwik. Thereby it would be possible to create consistent database dumps before the update. I get by with commenting out all piwik trackers but this is very costly and caching should be disabled.

@mattab
Copy link
Member Author

mattab commented Mar 11, 2011

Good point, I guess we could document the official way to disable Tracker, update piwik/piwik.php and at line 13, change

define('PIWIK_ENABLE_TRACKING', true);

to

define('PIWIK_ENABLE_TRACKING', false);

Therefore no SQL query should be issued to the server.

@anonymous-matomo-user
Copy link

Is there a way to prevent the user access to URL/piwik/index.php except the piwik user admin (update-mode) for the moment of the update? Because in case of updating the piwik source everybody could call the url and launch the database update via url what would be bad. If I remember correctly there is no user authentication after updating the source (of course in case of updating the db scheme, the users are in the database...).

@anonymous-matomo-user
Copy link

I have to add that updating database scheme via console should always be allowed. In my case it would be great if I could disable updating the database scheme via gui. Instead of showing the update site there could be a message that piwik is currently updating and the user should have a little patience.

@robocoder
Copy link
Contributor

this sounds familiar ... was this discussed elsewhere?

I'm thinking an "update in progress" file or setting would:

  • index.php: inform user that an update is in progress and/or block the request (eg API request).
  • piwik.php: log to a file (ala TrackerSecondaryDb); if the format of tracking requests are no longer compatible, the tracker would discard upon restart, otherwise bulk-load

@mattab
Copy link
Member Author

mattab commented Mar 11, 2011

Logging requests to a file is out of scope for this ticket, but this is #134 and it will indeed automatically work when updating as well.

I like the idea of blocking the UI while update is ongoing. We could "touch" a file regularly and other requests, in the Updater module, would test for this file timestamp to see if update is ongoing.

@anonymous-matomo-user
Copy link

+1

@mattab
Copy link
Member Author

mattab commented Mar 26, 2011

(In [4203]) Fixes #2175 Adding link, in update screen, to the new FAQ explaining how to disable tracking & the piwik UI via the config file

@mattab mattab added this to the Piwik 1.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

3 participants