Well, today marks 2 months since I started my experiment of killing MSACCESS.EXE every couple days instead of having to reboot Windows once a week. I'm pretty confident at this point that the problem is a memory leak inside Access itself.
P.S. And I'm not saying that Access is completely to blame. It could be something in my own code. This is a database that I've been building and upgrading and modifying since 2002 and there's lots of spaghetti code in it. I'm sure there are object variables that I set and didn't forget. So I'm not saying that it's Access' fault. The problem could be mine, but at least I've come up with a good solution.
Hunting down every questionable bit of code in this database would take weeks, if not months. Plus as I always say, my database is a bit like Scotty's engine room. It normally hums along just fine but in some places I've got wires running around like Christmas tree lights. I'm like the mechanic that drives an old beat-up car because he's constantly tinkering with it. Sure I teach you guys how to build good databases but me from 24 years ago is nowhere near as knowledgeable as me from today.
And I ain't got the time to clean up his mess LOL.
Lisa Indeed! I'm going to let it run until Friday and reboot it anyways. Leaving Sunday for the Microsoft MVP Summit in WA, so I don't want to deal with having to reboot it while I'm gone. LOL
Donald Blackwell
@Reply 7 months ago
When I first glanced at the picture, you almost looked like Q. I guess that makes you the omnipotent Access developer, bending databases to your will with the snap, err, tap, of a key.
So the above image is from Gemini (Google) who is leading the AI image generation contest between itself and GPT. Here are the images that GPT created. A lot darker and I must say a lot more violent. LOL...
Donald yeah, I kinda thought that at first glance too. LOL. I gave the AI the famous pic of Riker and Picard firing on that alien worm creature inside of Commander Remmick in the first season finale...
Care to share the symptoms of your Access problem, that requires you to shutdown?
Most of my crashes are during development with changes VBA code or even changing table field definitions.
The symptoms are, a slight pause, and then it goes straight to doing a backup, or a complete hang without any indication it happened on a line of code. Sometimes it happens with my Menu form running, and other times not, so I'm never sure if it's VBA or just some internal corruption of the Access internals.
Thomas This is on a computer running Windows 10 or 11 with an Access database that runs in a loop 24/7. It handles things like sending emails, checking customer service requests, approving Forum posts, those kinds of non-critical tasks. In the past, if I didn't reboot the machine at least once a week, I would start getting "out of stack space" or "out of memory" errors. I always assumed Windows was the culprit, so for the past ten years or so I've just been rebooting the system weekly.
Recently I had the idea to simply kill the MSACCESS.EXE process instead. Since I started doing that, the problem has completely gone away. So there's clearly a memory leak somewhere in Access. It could very well be something in my own code, but this database has grown so large and Frankenstein-like over the years that tracking down the exact source of the leak would be a massive project. It could be something simple like recordsets not getting cleaned up properly.
At this point, restarting the Access process a couple of times a week fixes the issue, so I'm perfectly happy with that solution. After my nightly back up on Monday, Wednesday and Friday, I issue a command to kill Access and then restart the database and everything has been working great for two months now.
Thomas Gonder
@Reply 7 months ago
I've had the out of stack space happen when I've hit recursive errors in my run-time-error routines.
I had to add On error goto 0 in my RTE procedures, or sometimes setting another RTE routine to catch those.
Yeah, endless loops and recursion out of control will cause that. Pretty sure that's not it. It's probably just lots of small functions and subs that I declare objects in and don't clear them. They'll add up over days of endless looping.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Captain's Log.