Open chrisvwn opened 5 years ago
mod_stats was probably used with MySQL, before the switch to PostgreSQL. Also, it was maybe used with an earlier (very early) mod_dbd API. Apache DBD still was young in the days.
I suggest to check stats_dbd_prepare() carefully, if it uses the correct semantics. You could compare to mod_mirrorbrain (where it works).
Another question: did you configure queries as can be seen in https://github.com/poeml/mirrorbrain/blob/master/mod_stats/mod_stats.conf ?
I don’t quite understand how our modules trigger this seemingly dbd-internal error.
Am 22.02.2019 um 15:24 schrieb Chris Njuguna notifications@github.com:
I am aware that mod_stats has not been maintained for a while now, however, I am looking at possibly modifying it to log realtime stats for an mb installation.
mod_stats builds fine and seems to run, however, I have noticed that when I enable it the mod_dbd connections fail for both mb and mod_stats. Is there a reason that this should happen? Maybe there is something outdated?
Apache is using mpm_event and mod_dbd.
This is what the mb logs look like without mod_stats:
Thanks @poeml I will look at the stats_dbd_prepare().
I did configure the queries - rewritten for postgresql. These are the queries I have - are they alright?
StatsDBDQuery "UPDATE redirect_stats SET count=count+1, counted_at=NOW() WHERE project=%s AND repository=%s AND arch=%s AND filename=%s AND filetype=%s AND version=%s AND release=%s"
StatsDBDSelectQuery "SELECT id FROM redirect_stats WHERE project=%s AND repository=%s AND arch=%s AND filename=%s AND filetype=%s AND version=%s AND release=%s"
StatsDBDDeleteQuery "DELETE FROM redirect_stats WHERE project=%s AND repository=%s AND arch=%s AND filename=%s AND filetype=%s AND version=%s AND release=%s"
StatsDBDInsertQuery "INSERT INTO redirect_stats (id, project, repository, arch, filename, filetype, version, release, counted_at, package) VALUES (%i, %s, %s, %s, %s, %s, %s, %s, NOW(), %s)"
I am perplexed how enabling mod_stats affects mb via dbd.
I have just realized that I had installed mirrorbrain from the OpenSUSE mirrors at http://download.opensuse.org/repositories/Apache:/MirrorBrain/xUbuntu_15.10/ Meanwhile, I downloaded mod_stats from here on github since the packages did not have mod_stats. I have just realized what I have installed is mb version 2.18.1 while the master seems to be at 2.19.0. Is this likely to cause a problem? Do I have to upgrade the mirrorbrain?
I am aware that mod_stats has not been maintained for a while now, however, I am looking at possibly modifying it to log realtime stats for an mb installation.
mod_stats builds fine and seems to run, however, I have noticed that when I enable it the mod_dbd connections fail for both mb and mod_stats. Is there a reason that this should happen? Maybe there is something outdated?
Apache is using mpm_event and mod_dbd.
This is what the mb logs look like without mod_stats:
However, once I enable mod_stats, both mb and mod_stats log errors related to dbd. For convenience the error line is:
The full logs
Any assistance would be appreciated.