Giter VIP home page Giter VIP logo

Comments (7)

rouilj avatar rouilj commented on June 16, 2024

Ping anybody have a clue what's happening here?

Is there any way to export the config and create a new database? Even if I have to throw away all the existing
data, I need to get this back online.

from goatcounter.

arp242 avatar arp242 commented on June 16, 2024

The hits table isn't queried directly; instead it uses the hit_counts and hit_stats tables:

[~]% ./goatcounter db  query 'select * from hit_counts order by hour desc limit 10'                                                                                            de:19:32
site_id  path_id  hour                 total
1        91       2023-05-16 19:00:00  1
1        194      2023-05-16 19:00:00  1
1        108      2023-05-16 19:00:00  1
1        232      2023-05-16 18:00:00  1
1        83       2023-05-16 18:00:00  4
1        194      2023-05-16 18:00:00  2
1        307      2023-05-16 18:00:00  1
1        91       2023-05-16 18:00:00  1
1        88       2023-05-16 18:00:00  1
1        294      2023-05-16 18:00:00  1

[~]% ./goatcounter db  query 'select * from hit_stats order by day desc limit 3'                                                                                               de:19:32
site_id  path_id  day                  stats
1        212      2023-05-16 00:00:00  [0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
1        279      2023-05-16 00:00:00  [0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
1        101      2023-05-16 00:00:00  [0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

Anyhow; it's really hard for me to say what's going on; is there any chance you can attach or email me the SQLite file? It's best to stop goatcounter and run:

./goatcounter db query 'vacuum'

After which there should just be one file, which can be copied/compressed as a backup.

You can export the pageviews and import them again clearing all existing data in the UI; that is based on the hits table, but without knowing why it's not working I would strongly recommend backing up the sqlite database file first per the above method (stop, vacuum, cp). I should perhaps add a command for this 🤔

from goatcounter.

rouilj avatar rouilj commented on June 16, 2024

Hello Martin:

Thanks for helping me with this. I have a new release of documentation going out and would like to get the stats back on line so I can compare before to after. Here are the results of the queries:

./goatcounter db  query 'select * from hit_counts order by hour desc limit 10'
site_id  path_id  hour                 total
1        2        2023-05-16 19:00:00  0
1        31       2023-05-16 17:00:00  0
1        31       2023-05-16 16:00:00  0
1        26       2023-05-16 16:00:00  0
1        28       2023-05-16 16:00:00  0
1        48       2023-05-16 16:00:00  0
1        47       2023-05-16 16:00:00  0
1        161      2023-05-16 16:00:00  0
1        76       2023-05-16 16:00:00  0
1        132      2023-05-16 16:00:00  0

the other one returns:

 ./goatcounter db  query 'select * from hit_stats order by day desc limit 3'
site_id  path_id  day                  stats
1        27       2023-05-02 00:00:00  [0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
1        43       2023-05-02 00:00:00  [0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
1        176      2023-05-02 00:00:00  [0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

the graphs for the last 6 days are all flatline at 0.

Should I send the compressed sqlitedb (about 4MB decompresses to 18M) to support at goatcounter.com?

Thanks again for your help.

-- rouilj

from goatcounter.

arp242 avatar arp242 commented on June 16, 2024

Should I send the compressed sqlitedb (about 4MB decompresses to 18M) to support at goatcounter.com?

Yeah that's fine.

from goatcounter.

welpo avatar welpo commented on June 16, 2024

How was this solved? I'm having the same issue, except mine is happening on a fresh install (#704).

I did change the e-mails associated with the sites before implementing the scripts.

from goatcounter.

rouilj avatar rouilj commented on June 16, 2024

Martin was able to create a program to fix the issue. I don't have the program anymore and IIUC the cause, it should not happen when using a new goatcounter. It was the result of upgrading goatcounter.

from goatcounter.

welpo avatar welpo commented on June 16, 2024

I see. Thanks for letting me know.

from goatcounter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.