XAMPPRocky / tokei_rs

The tokei.rs server code.
Apache License 2.0
58 stars 11 forks source link

All badges show 0 #123

Closed martin-t closed 7 months ago

martin-t commented 2 years ago

Not sure when this started (at least yesterday) but it seems that all badges on all projects using tokei.rs show 0 lines of code. It can be seen for example in tokei's own readme.

martin-t commented 2 years ago

Seems to be fixed now, closing. Thanks in case you did something ;)

XAMPPRocky commented 2 years ago

Thank you for your issue! Yeah, it's a bug where the server was out of disk space, restarting and adding a cleanup task fixed it.

martin-t commented 2 years ago

Looks like the issue has returned, no idea if the cause is the same.

baseplate-admin commented 2 years ago

Thank you for your issue! Yeah, it's a bug where the server was out of disk space, restarting and adding a cleanup task fixed it.

Umm... sorry for intruding,

But can't you set up a watchdog service and monitor the folder size? So that when the folder gets big, it will auto delete old files?

miraclx commented 2 years ago

Just bumping here because this Issue has returned again.

XAMPPRocky commented 2 years ago

@baseplate-admin There's a lot I could do, but the amount of time I can spend working on it at the moment is very limited as I have a full-time job and other obligations for other projects. If you'd like me to spend more time on this project, sponsoring me on GitHub directly affects the amount of time I can spend on projects like tokei.rs.


@miraclx Fixed now, thank you.

Khadeeejah commented 2 years ago

Hi @XAMPPRocky, thanks for building this.

I just ran into this issue and I'm not sure the cleanup script is working yet. Could you take a look?

XAMPPRocky commented 2 years ago

@Khadeeejah I'll give it a kick, but to clarify for people in the thread it's not a cleanup script issue. The issue is that some people are requesting repositories than are larger than the total disk space of the server. I'm not storing things in object storage as that's very expensive and requires decent effort to ensure that the bill doesn't scale out of control. I do have some much larger fixed sized storage that I'm moving tokei.rs too, but again I haven't had the time to debug all the issues with the new server setup yet.

JordanWelsman commented 1 year ago

@XAMPPRocky Thank you for your work on this. Do you have any updates on if the migration was successful or if there will be any further work to fix the 0 lines issue?

XAMPPRocky commented 1 year ago

@JordanWelsman Thank you for your question, unfortunately I've not had any time to spend on tokei.rs, so the status of that hasn't changed. I will restart the server when the issue is noticed.

JordanWelsman commented 1 year ago

@XAMPPRocky The issue seems to be fixed, at least on my repositories. Need more people to confirm. Thanks!

AlbertUnruh commented 1 year ago

Don't know whether it was working in the meantime, but in all my repos the line-count is at 0 and in about 20% everything else is at 0 as well (but this may be due to the inactivity of the repos).

JordanWelsman commented 1 year ago

Yep, back to showing zero for my repos too.

Trolldemorted commented 1 year ago

is it gone for good now? Are there any alternatives?

aschey commented 1 year ago

I made a version of this that runs as a Vercel serverless function so that it can be more resilient against large requests that take down the service. Since it's serverless, it'll just spin up a new container if the current one dies. You can use the link I provide in the repo or fork it and host it on your own Vercel account. https://github.com/aschey/vercel-tokei

XAMPPRocky commented 1 year ago

Since it's serverless, it'll just spin up a new container if the current one dies.

To be clear, as I mentioned above, the problem is not the service "dying", it's that the server runs out of storage space from large repositories. I'd warn anyone against using a service like Vercel to host the service publicly because they offer extremely small amounts of storage for prices that are more double what it costs to run on a VPS with 80x the storage capacity. And since there's no storage space check currently, you run the risk of having a runaway bill from someone requesting the statistics of LLVM.

aschey commented 1 year ago

Since it's serverless, it'll just spin up a new container if the current one dies.

To be clear, as I mentioned above, the problem is not the service "dying", it's that the server runs out of storage space from large repositories. I'd warn anyone against using a service like Vercel to host the service publicly because they offer extremely small amounts of storage for prices that are more double what it costs to run on a VPS with 80x the storage capacity. And since there's no storage space check currently, you run the risk of having a runaway bill from someone requesting the statistics of LLVM.

They don't have my payment info on file so I'm not too concerned about that. I haven't managed to exhaust the disk space on a single container, but I don't think it's possible since it uses a temp dir that gets cleaned automatically and very large repositories will cause the function to time out while cloning.

XAMPPRocky commented 7 months ago

I've moved to some new infra, which should prevent this from happening again, so going to close for now.

Trolldemorted commented 4 months ago

It's down again :(

ISSOtm commented 2 months ago

Cloudflare is currently returning a 525. I don't know if this is related.

(By the way, I almost missed that this issue existed. Might I suggest pinning it and/or renaming it, to increase its visibility? And thank you for your efforts! ^^)