I have a plot with a lot of measurement datapoints. I exported this plot from Matlab2tikz.
When I wanted to compile this, it said that the memory was exceeded. Now I found this, How to expand TeX's “main memory size”? (pgfplots memory overload). It tells me that I can export different tikzpictures to different files. This unluckely didn't help me since I only got 1 tikzpicture and it is already causing the problem.
So I actually tried to increase the memory of TeX. I went to
/usr/share/texlive/texmf/web2c then in
texmf.cnf I changed
main_memory = 3000000 to
main_memory = 5000000. Then I ran
texhash and tried to compile my TeX file again.
My problem is that after I increased the memory limit I again get the same error.
! TeX capacity exceeded, sorry [main memory size=3000000].. However I did just changed it to
5000000. So I presume that I did something wrong when increasing the memory limit?
Eventually I just used lualatex. This is due to the fact that I think there is something wrong with my texlive install, it is installed twice on my system for some reason. I think however that the answer of @Heiko Oberdiek is correct hence mark his question as the correct one.