Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

rrdtool.OperationalError: new_accounts.rrd: illegal attempt to update using time (minimum one second step) #44

Open
jaesivsm opened this issue Jun 12, 2018 · 3 comments

Comments

@jaesivsm
Copy link
Contributor

Impacted versions

  • modoboa==1.10.5
  • modoboa-stats==1.4.0
  • installer used: yes but not for upgrade
  • Webserver: Nginx (irrelevant)

Steps to reproduce

root@server# $PYTHON $INSTANCE/manage.py update_statistics
Traceback (most recent call last):
  File "/srv/modoboa/instance/manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_stats/management/commands/update_statistics.py", line 84, in handle
    self.update_account_creation_stats(options["rebuild"])
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_stats/management/commands/update_statistics.py", line 79, in update_account_creation_stats
    rrdtool.update(str(db_path), *data)
rrdtool.OperationalError: /srv/modoboa/rrdfiles/new_accounts.rrd: illegal attempt to update using time 1528812000 when last update time is 1528812000 (minimum one second step)
@BioSs54
Copy link

BioSs54 commented Jul 9, 2018

Have same problem. Have you solved it ??

@tonioo
Copy link
Member

tonioo commented Jul 9, 2018

Looks like the script tries to record two samples for the same timestamp... Do you have this error every time you run the script? If you run it manually, make sure to respect the defined interval between 2 samples (5 minutes if I remember well)

@cremesk
Copy link

cremesk commented Mar 18, 2019

Same here.
default cron:
0 * * * * root $PYTHON $INSTANCE/manage.py update_statistics

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants