Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 Agent db file insanely large #6501

Open
samschultzponsys opened this issue Nov 5, 2024 · 21 comments
Open

Windows 7 Agent db file insanely large #6501

samschultzponsys opened this issue Nov 5, 2024 · 21 comments
Labels

Comments

@samschultzponsys
Copy link

Describe the bug
I noticed the .db file in my program files directory for my mesh agent is 72gb which is nuts

To Reproduce
Steps to reproduce the behavior:

  1. So far seems to be a windows 7 issue but I will be checking more agents soon.

Expected behavior
.db file should not be massive

Screenshots
image

Server Software (please complete the following information):

  • OS: Debian 11
  • Virtualization: Remove VPS
  • Network: WAN no proxy
  • Version: 1.1.32
  • Node: 18.20.4

Client Device (please complete the following information):

  • Device: Windows 11 laptop
  • OS: Windows 11 64
  • Network: Remote to the mesh server
  • Browser: Chrome latest release
  • MeshCentralRouter Version: N/A

Remote Device (please complete the following information):

  • Device: Windows 7 64 bit professional computer
  • OS: Windows 7 64 bit professional computer
  • Network: remote to server via WAN
  • Current Core Version (if known): info not showing this in console

Additional context
Add any other context about the problem here.

Your config.json file
will add in comment my config if needed but we have no issue on all win10 and 11 platforms currently. I am checking other windows 7 instances and will update what I find in the comments.

@samschultzponsys
Copy link
Author

Doing a reinstall now on this client to see if this is reproducible, also checking other win7 clients now.

@samschultzponsys
Copy link
Author

same issue at another location with win7 64 pro
image

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

WIndows 7 is unoffically supported and its very hard for us to fix it if its a bug with windows 7
let me just check tho, i think the is a clean up command you could try to shrink the db file
but to me that doesnt seem right anyways (48gb)

@samschultzponsys
Copy link
Author

.log file shows:

image

@samschultzponsys
Copy link
Author

The db file is literally growing while i watch it, I just did an agent reinstall on the first one let me see if the db is already increasing on that one. Thank you for looking at this.

@samschultzponsys
Copy link
Author

I am going to check a 32 bit win7 next.

@samschultzponsys
Copy link
Author

I have a db file on a 32 bit client that is 2gb is that more expected? If so I have done a reinstall at one location and the file does not seem to be rampantly growing so I can monitor this and report back. Reinstall or using the 32 bit agent might be the easy fix.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

the db file should only be at most like 5MB, not 5GB !
if you uninstall/reinstall it might delete the .db file and then you will have duplicate machines in your web ui

@samschultzponsys
Copy link
Author

I dont mind duplicates I can clean it. I am not sure what to do to keep the sizes down, im ok with 2-5gb anything bigger I am gonna be in a bind.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

the file shouldnt even be 1GB, so the is something wrong or a leak or something
try running the command dbcompact from the console tab of a device in the web ui
it should compact/shrink it down, not sure if it works tho?
trial and error?

@samschultzponsys
Copy link
Author

sure ill give that a shot. Ill report back.

@samschultzponsys
Copy link
Author

image
no luck so far, doesnt seem to be shrinking but also could just not be doing anything at the agent level.

@samschultzponsys
Copy link
Author

dbcompact does not seem to work when the db file is this large. Stopping tasks and services, deleting the db file seems to be fixing this as of now but I will monitor over the week to see if the files grow. The 2gb one i mentioned before has now gone down to like 175K and most are in that range now on Win7. Thank you for your help.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

if you can run the info or help command then generally the meshagent is stuck doing something else
as they are very basic commands
it might of been dbcompact WAS doing something but might of taken a very very long time,
but is u delete the .db file and its back down to KB size then thats good!
just keep an eye on it, if it starts creaping up like 100MB then something is definely wrong!

@samschultzponsys
Copy link
Author

Gotcha, yea the agent seemed stuck so i ran the other commands to see if we would get any output. The output I see on normal sites is dbcompact, is compacted 0, is this a percentage or whats up.

@si458
Copy link
Collaborator

si458 commented Nov 5, 2024

@samschultzponsys erm you tell me haha 🤣

case 'dbcompact': {
  if (db == null) { response = 'Database not accessible.'; break; }
  var r = db.Compact();
  response = 'Database compacted: ' + r;
  break;
}

ive searched all the code i can and i cant find where the Compact command is
so i think its part of duktape or something else
i guess you could watch the db file increase over time, then run every so often and maybe compare size with output?

@samschultzponsys
Copy link
Author

you guys and your fancy code hahah

@samschultzponsys
Copy link
Author

Upon checking the db files are still growing, I am at 250MB on the one I reinstalled yesterday.

@si458
Copy link
Collaborator

si458 commented Nov 6, 2024

There must be something that the machine doesn't like or is running

one thing u can try is running it at the command line instead of a service, and watch its output and see if it suits anything out

  1. Stop service
  2. Cmd.exe to folder of meshagent.exe
  3. Meshagent.exe connect

Note that this might create another device (who knows why, haha)

@samschultzponsys
Copy link
Author

So that command did not seem to do anything but the sizes are fluctuating a lot, yesterday the .db was 250mb and now its 20mb. So I guess a reinstall is the solution as the latest agent must be more stable lol.

@si458
Copy link
Collaborator

si458 commented Nov 8, 2024

@samschultzponsys we haven't updated the binary exe since 2022 😅

So i think it's something else and the fact you are running an unsupported operating system

It could be something stupid like we run powershell scripts to check bitlocker or powershell to check hard drives stats, maybe these are failing and it's not being caught correctly, but it's hard to tell

I couldn't even get a windows 7 vm running to test because I can't install any updates to make it like up to date as much as possible (any suggestions tho would be good haha)

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

No branches or pull requests

2 participants