Aw-server frequently slowing down computer

aw-server is running at about 50% CPU usage. Any ideas why this would happen or how to reduce that?

Many thanks!

1 Like

Are you using macOS specifically and it’s not the aw-server process specifically it might be this bug

If that’s not the case, the only time it should possibly use that much CPU is of there is someone doing large requests to aw-server (such as when in the web-ui changing date in the Activity view).

If it’s neither of those two cases, we’d love to get some help debugging what the issue might be.

I don’t think it is either of these cases.

I’m using Ubuntu 18.04.4 LTS. And this is happening, as far as I can tell, all the time. Even if I close Firefox, and disable the Firefox add-on.

I have it running on start up via ~/.config

I installed it around last July. Is there a way to check what version I am running, or a way to update without reinstalling?

And this is probably not useful, but if I end the process via top in the terminal, ActivityWatch pops up with this info:

{“asctime”: “2020-05-28 01:09:25,063”, “filename”: “main.py”, “funcName”: “main”, “levelname”: “INFO”, “lineno”: 25, “module”: “main”, “message”: “Using storage method: peewee”, “name”: “aw_server.main”, “pathname”: “aw_server/main.py”}

{“asctime”: “2020-05-28 01:09:25,063”, “filename”: “main.py”, “funcName”: “main”, “levelname”: “INFO”, “lineno”: 30, “module”: “main”, “message”: “Starting up…”, “name”: “aw_server.main”, “pathname”: “aw_server/main.py”}

{“asctime”: “2020-05-28 01:09:25,064”, “filename”: “peewee.py”, “funcName”: “init”, “levelname”: “INFO”, “lineno”: 111, “module”: “peewee”, “message”: “Using database file: /home/ben/.local/share/activitywatch/aw-server/peewee-sqlite.v2.db”, “name”: “aw_datastore.storages.peewee”, “pathname”: “site-packages/aw_datastore/storages/peewee.py”}

{“asctime”: “2020-05-28 01:09:25,070”, “filename”: “_internal.py”, “funcName”: “_log”, “levelname”: “INFO”, “lineno”: 87, “module”: “_internal”, “message”: " * Running on http://localhost:5600/ (Press CTRL+C to quit)", “name”: “werkzeug”, “pathname”: “site-packages/werkzeug/_internal.py”}

{“asctime”: “2020-05-28 10:40:48,673”, “filename”: “log.py”, “funcName”: “log”, “levelname”: “INFO”, “lineno”: 25, “module”: “log”, “message”: “400 (127.0.0.1): POST /api/0/buckets/aw-watcher-web-firefox HTTP/1.1”, “name”: “flask”, “pathname”: “aw_server/log.py”}

{“asctime”: “2020-05-28 14:39:17,650”, “filename”: “log.py”, “funcName”: “log”, “levelname”: “INFO”, “lineno”: 25, “module”: “log”, “message”: “400 (127.0.0.1): POST /api/0/buckets/aw-watcher-web-firefox HTTP/1.1”, “name”: “flask”, “pathname”: “aw_server/log.py”}

{“asctime”: “2020-05-28 15:30:27,568”, “filename”: “log.py”, “funcName”: “log”, “levelname”: “INFO”, “lineno”: 25, “module”: “log”, “message”: “400 (127.0.0.1): POST /api/0/buckets/aw-watcher-web-firefox HTTP/1.1”, “name”: “flask”, “pathname”: “aw_server/log.py”}

From that JSON-formatted log it looks like the version you’re using it ancient. Updating is likely to fix it.

And no, reinstalling is the only way to update (we haven’t gotten around to making a PPA just yet).

That fixed it! Thanks so much