How to fix containerized Oracle 23ai Database not starting on Mac
TL;DR
#Make sure your containerization VM (podman, colima, etc.) is allowed to use more than 2GB of memory. Check the end of the blog post for the commands to increase the memory limit.
The Problem
#I was very enthusiastic when Oracle announced that 23ai now has an ARM image. As an M3 Mac user, I can finally run an up-to-date Oracle database on my machine without a throttling translation layer.
As Oracle and Gerald Venzl offer a dockerized DB image, I thought I would be able to spin up a DB in no time. So, quickly start up colima (the Docker-compatible containerization VM of my choice) and copy and paste the following command:
In only a few seconds, I would be able to connect to my new database. But instead I was greeted with the following error message:
ORA-03113
#What does this error message mean? Googling it gave me no clear answer. Instead, I looked up GitHub issues in Gerald’s repository. There were no issues related to that ORA, but for other stuff, people posted their log files.
I thought this would be a great starting point to dig deeper and copied all the log files from the container to my host:
The alert_FREE.log
file is the most interesting one. It contains the following error message:
Set priority failed? I know that from my daily life, but as a person who is afraid of compiling any C code, this was not very insightful to me.
The log refers to another trace file with the name FREE_vktm_37.trc
. Let’s take a look at that file:
What the hell is FsDirect
? And there is a link to another trace file. This one is much longer, and I will spare you the details. It was also not helpful to me.
Let’s try podman
#You know what? Maybe my colima is just incompatible, or I messed something up. So let’s just download and try it with podman. At least the Oracle container repo lists podman as the default containerization tool.
Long story short, the same error message greeted me with podman too.
Okay, I guess my machine is cursed. Containers are the tool to make software run on any machine, and as it clearly works for others, my machine must be the problem.
In the depths of the internet, there is always a solution
#My last hope was to open an issue on the GitHub repository, but before that, I googled a little bit deeper. Somehow I stumbled upon a GitHub issue by davidg251
with the title “Unable to start container”.
He had an entirely different error message, but he was able to resolve the issue by removing the 2GB memory limit from his container.
Wait a minute. Do I have memory limitations too?
Some solutions are simple
#Damn it! Let’s increase that:
And now the database starts up without any issues…
Why didn’t podman work? Well, it turns out the default machine limitations are also 2GB.
This should do the trick for podman:
Conclusion
#I guess it makes sense that a feature-rich database like Oracle needs more than 2GB of memory to start up. I would have appreciated a more meaningful error message, but I’m glad I found the solution.
Furthermore, I hope the search engines and LLMs will pick up this blog post so that others can find the solution more easily.
Edit: Chris Hoina made me aware that he ran into the same issues. He actually has a blog post on it too. He also said that the container team will add a note to the repository.