# Error Storing a Large Table

**URL:** <https://forum.kx.com/t/error-storing-a-large-table/11530>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [April 27, 2017, 12:27pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530 "2017-04-27T12:27:00Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 27, 2017, 12:27pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/1 "2017-04-27T12:27:00Z")

</div>

Hello, wondering if someone can help me out.

I am trying to store a large table in batches by upserting to disk, in batches using

`((`:e:/hdb/nbbo) upsert .Q.en[`:c:/hdb] nbbo);`

Seems to be fine if I stop the loader once a few million rows have been stored. &nbsp;But if I let it run to completion if I try and query it I get this error

`ERROR: 'e:/hdb/nbbo/sym: The operation completed successfully. (user-defined signal)`

I can’t sort the table, apply attribute or just query it.

Any ideas?

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 27, 2017, 1:29pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/2 "2017-04-27T13:29:00Z")

</div>

Now I’m trying to query the table while the loader is running. &nbsp;I am seeing these errors. &nbsp;

`disk compression - bad logicalBlockSize`

`Not enough storage is available to process this command. `

did I not set compression correctly? &nbsp;Basically I just set&nbsp;

` .z.zd::(17;2;6);`

and then started upserting

---

<div class="post-metadata">

**Author:** ![trentkg](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@trentkg](https://forum.kx.com/u/trentkg)\
**Post date:** [April 27, 2017, 2:17pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/3 "2017-04-27T14:17:00Z")

</div>

…I didn’t know you could compress a table saved to disk.&nbsp;

Is this table splayed? What about partitioned?&nbsp;

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 27, 2017, 2:41pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/4 "2017-04-27T14:41:00Z")

</div>

Yes it is splayed and partitioned, just removed path specifics for post

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [April 27, 2017, 4:22pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/5 "2017-04-27T16:22:00Z")

</div>

upsert to a splay&nbsp;appends only if the files contain vectors of fixed-width primitives of non-nested data with no attributes. Otherwise, the file is rewritten in full on each append.

compressed files cannot be read safely whilst they are being appended to.

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 27, 2017, 8:29pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/6 "2017-04-27T20:29:00Z")

</div>

Right, I am appending to a Splay, with a table without any attributes. &nbsp;But when I stop loader and try and query the table I get this error

`Not enough storage is available to process this command. `

seems to work until I have around 30,000,000 + rows

---

<div class="post-metadata">

**Author:** ![Nick10](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nick10](https://forum.kx.com/u/Nick10)\
**Post date:** [April 28, 2017, 2:53am UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/7 "2017-04-28T02:53:00Z")

</div>

googling suggests that this is related to IRPStackSize:

https://windowsinstructed.com/fix-not-enough-storage-is-available-to-process-this-command/  
https://www.cm3solutions.com/enough-storage-available-process-command-visual-studio/

do you have 32 bit windows?

if you only query for 1 column do you get the same error?

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 28, 2017, 1:01pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/8 "2017-04-28T13:01:00Z")

</div>

Tried adding that regedit fix but did not work and querying 1 col did not work either. &nbsp;Windows I’m using is 64bit.

Its weird, if I start storing the table compressed, then I can query it until a certain point then it throws that error. &nbsp;If I store the table as uncompressed then I can never query the table getting the same error. &nbsp;So it looks like it may have something to do with the size of the segments on disk.

---

<div class="post-metadata">

**Author:** ![trentkg](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@trentkg](https://forum.kx.com/u/trentkg)\
**Post date:** [April 28, 2017, 2:18pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/9 "2017-04-28T14:18:00Z")

</div>

Are you using 32bit or 64bit q for windows?&nbsp;

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 28, 2017, 2:36pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/10 "2017-04-28T14:36:00Z")

</div>

I’m using 32b free license q for windows atm. &nbsp;

---

<div class="post-metadata">

**Author:** ![trentkg](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@trentkg](https://forum.kx.com/u/trentkg)\
**Post date:** [April 28, 2017, 2:37pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/11 "2017-04-28T14:37:00Z")

</div>

32bit only allows for ~4 gigs of memory. When I run over this limit on linux, q throws a 'wsfull error. Maybe thats the error you’re getting, but its different in windows?&nbsp;

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 28, 2017, 3:09pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/12 "2017-04-28T15:09:00Z")

</div>

Well I do see `wsfull errors on windows generally. &nbsp;This seems to be an OS error though, wondering if could be related.

`OS reports: Not enough storage is available to process this command.`

Thanks

---

<div class="post-metadata">

**Author:** ![hoffmanroni1](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hoffmanroni1](https://forum.kx.com/u/hoffmanroni1)\
**Post date:** [April 28, 2017, 9:35pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/13 "2017-04-28T21:35:00Z")

</div>

Thanks for everyones help, turns out it was mem issue with 32b but was getting OS error instead of wsfull.

---

<div class="post-metadata">

**Author:** ![trentkg](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@trentkg](https://forum.kx.com/u/trentkg)\
**Post date:** [April 28, 2017, 10:29pm UTC](https://forum.kx.com/t/error-storing-a-large-table/11530/14 "2017-04-28T22:29:00Z")

</div>

I’ve seen strange errors like this before in linux too - when I’ve tried to query a database in 32bit q and run out of memory, it does not show wsfull when reading from disk.&nbsp;
