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

problems with multi machine installation #1453

Closed
sgiehl opened this issue Jun 29, 2010 · 5 comments
Closed

problems with multi machine installation #1453

sgiehl opened this issue Jun 29, 2010 · 5 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@sgiehl
Copy link
Member

sgiehl commented Jun 29, 2010

One of our customers is using piwik on a high traffic website. To handle all the request there are two nodes with piwik behind a loadbalancer.

There are some problems appearing with this system configuration. When changes are made to plugins, the settings are stored in the local config file. But this happens only on the machine the request has been sent to. So plugins are active only on one of the two machines.

This also brings problems when installing new plugins, that try to make database changes in install method.

@mattab
Copy link
Member

mattab commented Jun 29, 2010

This is a known bug - users with multiple boxes would have to rsync the config files over, and purge tmp/*

The config file is necessary to store Super user settings and allow override of other settings from global.ini.php

can you think of a solution that we could implement in Piwik to make it a non issue, or is it a won't fix?

@robocoder
Copy link
Contributor

Use bootstrap.php to define PIWIK_USER_PATH -- and point it at a shared network directory to host the config and tmp folders.

Future idea:

  • post an event when config file or cache files are removed/updated.
  • add a plugin that:
    • keeps track of the machines in the cluster
    • listens for the event and notifies other machines in the cluster via a REST API method
    • has a REST API method to invalidate its cache (eg software update) or specific cache files (eg cache/tracker)

@anonymous-matomo-user
Copy link

Well, as I'm having the same issue I wouldn't recommend to build some complex thing like tracking machines in a cluster and pushing changes to it.
Just do some simple things:

  • to avoid session issues on login use some other session backend like memcache (can be done on the user side, not your part to change that)
  • store settings which change during runtime like enabled/disabled plugins in the database (I currently just reload the site over and over until all nodes picked up the change). Usually only installation critical settings like database settings are stored in the files.

@robocoder
Copy link
Contributor

Pushing an update requires less resources.

If we move the config (except db connection info and maybe superuser), we'd have to maintain lastModified timestamps for the config and site tables, so machines could determine if they need to refresh cache files or not. Adding this query to the tracker would impair tracker performance.

The session issue is covered by another ticket.

@mattab
Copy link
Member

mattab commented Jul 29, 2010

I think a wont fix for now. It makes sense to tie config file to enabled plugins and database infos.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

4 participants