Windows 7 Agent db file insanely large
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:
- 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
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.
Doing a reinstall now on this client to see if this is reproducible, also checking other win7 clients now.
same issue at another location with win7 64 pro
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)
.log file shows:
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.
I am going to check a 32 bit win7 next.
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.
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
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.
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?
sure ill give that a shot. Ill report back.
no luck so far, doesnt seem to be shrinking but also could just not be doing anything at the agent level.
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.
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!
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.
@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?
you guys and your fancy code hahah
Upon checking the db files are still growing, I am at 250MB on the one I reinstalled yesterday.
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
- Stop service
- Cmd.exe to folder of meshagent.exe
- Meshagent.exe connect
Note that this might create another device (who knows why, haha)
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.
@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)
ok so i have fully replaced as many powershell things i can with our win-wmi module! the was only 2 commands left which we cant convert yet! so what you could try is upgrade to 1.1.35 and monitor the .db file and see if it increased or not 👍
I have updated to 1.1.35, thank you much for looking into this, we have, since catcfhing the growing db issue, been seeing the task also go up to 100 percent usage and crash windows. I am hoping this is due to whatever is also causing the db file size issue. Thanks a lot. Do I need to do anything to the agents, my understanding is the update server side should push down automatically.
@samschultzponsys u are correct. The updates we have done are server side, which should get pushed to ur windows 7 machines Let us know IF the db files are still increasing over time but I'm hoping the changes I have done should resolve the issue! As I'm thinking the issue was basically failed commands being logged everytime into the db file
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity. If you believe this is still relevant, please feel free to reopen it.