SELECT failure: "insufficient space for HEAP ..."

Stefan Manegold Stefan.Manegold at
Tue May 13 08:13:45 CEST 2014

Hi Edward,

sorry for the inconveniences and thank you for your kind words!

Could you check how large your merver5 process is at the time the error occurs?
At that very time, how much main memory and how much disk space (on the partition/drive
where your dbfarm is located) are still free?

Instead of the (statically generated) explain, a "live" trace of a failing run
would be more useful (if at all).
To create a trace, you'd need to start the server by hand using the M5server.bat
batch script, providing an extra "--trace" command line option, and collect
the server console output.

Also, if there is any more output before/after the error message you send,
that might be helpful to analyze the problem.


----- Original Message -----
> Hi,
> We have an application ( based on a
> relatively modest, single (~1-10M row, ~20 column) MonetDB table (Win7, 64
> bit, Jan14-SP1 server release, quad-core, 8GB RAM) and have been
> encountering sporadic SELECT query failures with the error: "Insufficient
> space for HEAP of 1017856 bytes".  Since I've been trying in earnest to
> diagnose this, that byte value has been consistent, FWIW.
> The failures are frustratingly intermittent; if I rerun a failing query
> (by hand, using mclient) it sometimes fails again, and sometimes works
> correctly.  I've been unable to figure out any sort of pattern.
> Unfortunately, I can't post the exact table and query, but the general
> form of the queries (which have ~5-10 case clauses) are:
>   WHEN Foo = 'ValueA' and Bar LIKE 'ValueB%' THEN 100*(Baz-1234)/1234
>   WHEN Foo = 'ValueC' and Bar LIKE 'ValueD%' THEN 100*(Baz-3456)/3456
>   ...
> FROM table
>   <same case statement as above> IS NOT NULL
> Any ideas what I might do to narrow this down or other information I might
> provide?  I captured an explain of a failing query--it's many hundreds
> (1000s?) of lines, so I didn't want to include it here in full.  All
> suggestions appreciated.  Thanks,
> Ed
> P.S.  MonetDB has been a fantastic complement to our application, thanks
> to everyone involved!
> _______________________________________________
> users-list mailing list
> users-list at

| Stefan.Manegold at | DB Architectures   (DA) |
|  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |

More information about the users-list mailing list