Issue with trying to run any yum/dnf command

I have not log in into the server for some time, and when i log in today to perform some task and update the software when i face this issue.

[root@server ~]# dnf update
Traceback (most recent call last):
  File "/usr/bin/dnf", line 21, in <module>
    from __future__ import unicode_literals
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 894, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1245, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1293, in _fill_cache
MemoryError

I`m trying to find what could be the issue but so success so far.
Any help is appreciated.

Thanks!

looks like you’re out of memory - what does “free -wth” return?

There is plenty of free memory:

[root@server ~]# free -wth
              total        used        free      shared     buffers       cache   available
Mem:          125Gi       6.2Gi       8.1Gi       609Mi       5.1Gi       105Gi       117Gi
Swap:          63Gi       2.3Gi        61Gi
Total:        189Gi       8.5Gi        69Gi

Still facing the issue