Bad allocation error every 10th plot?

About every 10th plot, even on different plotting drives, I keep getting this error, What is it?

Compressing tables 1 and 2
Caught plotting error: bad allocation
[7928] Failed to execute script chia
Traceback (most recent call last):
  File "chia\cmds\chia.py", line 81, in <module>
  File "chia\cmds\chia.py", line 77, in main
  File "click\core.py", line 829, in __call__
  File "click\core.py", line 782, in main
  File "click\core.py", line 1259, in invoke
  File "click\core.py", line 1259, in invoke
  File "click\core.py", line 1066, in invoke
  File "click\core.py", line 610, in invoke
  File "click\decorators.py", line 21, in new_func
  File "chia\cmds\plots.py", line 135, in create_cmd
  File "chia\plotting\create_plots.py", line 176, in create_plots
RuntimeError: bad allocation

Interesting! Have you run memtest on that machine to completion, one full pass, to be sure the memory is stable? Have you run mprime/prime95 overnight to be sure the CPU is stable?

I overclocked my CPU, barely, from 3.2 to 3.5, and then ran a stress test to make sure it didn’t overheat. It’s not anywhere near max or where it would be under a really bad stress. Most people over clock them to 3.7. I have not done any memory tests.

Now it is getting really annoying. I reset my OC to to default, and it is still doing it. I’m not sure what to do. Right now it is doing it 1 out of every 5 or so.

Make sure your pagefile is big enough. Turning it off will give you this error. (found out after following an SSD optimisation guide on the net)

1 Like

This is interesting, because I also see occasional bad plots on machines that I know are very very stable. So it could be that there are bugs in the plotter that occasionally produce invalid plots?

I mean plots that come out the other side as finished, but I have also seen machines occasionally do this “bad allocation” thing and halt all plotting, as described in your first post.

Ok, I actually changed pagefile awhile ago and seems to have helped. I have my C:/ (That chia runs off of) set to between 10 GB and 30 GB. My plotting drives are set to between 1 and 16 GB. Does that sound right? Or do I need to adjust that?

1 Like

It makes sense that “bad allocation” would mean “out of memory”. This is a good support topic if so; thank you for connecting the dots @DougieC !

Thing is, I have 32gb ram, and it would only happen with 4 to 5 plots going sometimes.

How much RAM are you allocating per plot? I just checked and the default is 3400mb. 3400mb × 5 = 17000mb so well under 32mb :thinking:

Even with ample ram, by turning off pagefile I started getting bad allocation. I changed to 10-30 at the time which stopped the errors (couldn’t change to system managed without a restart) then back to system managed after a hardware change which forced me to restart. You only need pagefile on the OS, can disable for plotters etc.

2 Likes

Only 4000. Even if you allocate more, it will only use so much

1 Like

Right. Definitely realizing that now. I’m going with 4096 because powers of 2 are just… more correct. :wink:

1 Like

4294.967 is more like it. (I’m not a know it all, I was just curious so I looked it up.)

I’m not following? What’s the significance of that number?

See, this is even more reason I tell people not to fritz with the defaults in the name of “optimization”. They’re just as likely to get themselves into trouble as they are to “optimize” anything…

1 Like