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

Allow to customize mysql settings when running core:archive console command #9959

Open
jaceklubzinski opened this issue Mar 23, 2016 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@jaceklubzinski
Copy link

We have many archiving processes and don't want to change the global parameters only if one of the archiving needs this.
Generally it is not a good practice to change some variables globally e.g. http://piwik.org/faq/troubleshooting/faq_183/

@tsteur
Copy link
Member

tsteur commented Mar 29, 2016

Can you explain the issue in more details? I'm not sure which mysql params you mean etc. And how would you like to set and use them?

@quba
Copy link
Contributor

quba commented Mar 29, 2016

E.g. wait_timeout. I presume that @jaceklubzinski wants to be able to set some mysql variables via core:archive param.

@tsteur
Copy link
Member

tsteur commented Mar 29, 2016

Similar to php-cli-options and we would do something like $this->_connection->query("SET foobarparam = $foobarvalue"); whenever we create database connection?

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Mar 29, 2016
@jaceklubzinski
Copy link
Author

Exactly what we want. Set database dynamic parameter like wait_timeout and max_allowed_packet as session parameter each time we create new database connection.

@mattab mattab added this to the 2.16.x (LTS) milestone Mar 31, 2016
@mattab mattab removed the PP label Jul 14, 2016
@mattab mattab changed the title Allow to customize mysql params per archiving process Allow to customize mysql settings when running core:archive console command Jul 18, 2016
@mattab mattab modified the milestones: 2.16.x (LTS), Mid term Aug 25, 2016
@otheus
Copy link

otheus commented Jun 6, 2022

What happened here? To quote myself in an email I sent the dev team a while back:

We need to fix Matomo1 so that it sets the wait_timeout per connection. Setting the server variable is an ugly ugly hack that does not 'play well with others'. Moving from mysqli to pdo/mysql makes it even worse, since old mysqi at least allowed auto-reconnection. (Forums tell me, however, this feature has been deprecated). Further, the pdo-mysql driver does not allow (or is not documented to allow) config/connection parameters to be set via the DSN. Perhaps it is allowed, but it is not documented. The solution can be found here: https://stackoverflow.com/a/21403360/3849157 . The wait_timeout setting should either be as given above (28800) or better yet, configurable in config.ini.

@justinvelluppillai
Copy link
Contributor

Hi @otheus this issue is in our backlog and we would welcome a contribution if you are able to provide a Pull Request for this. It is not currently in a milestone and it hasn't been scheduled yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

6 participants