Table is full MySQL error

If you’re using MySQL’s MEMORY table storage engine for anything intensive, you may run into the following error.

Table is full

This means what it says – memory tables have a fixed size they are allowed to me, 16mb by default, and once they reach this size, MySQL will prevent you from inserting any more data, to prevent the table from using too much memory.

If you run into this error, you can either increase the size in MySQL’s configuration, or you can switch to a disk based table engine such as Archive or InnoDB.

Saving files in memory

If you need super quick access to a file, for example a log file which isn’t going to be too big but it being used by a script which is time critical, then rather than writing it to disk, you can mount part of your file system in memory and write to it there.

This has the disadvantage that when you restart your system, you will lose the data. But for test scripts, logs or other temporary files that you don’t mind getting lost, it can really speed up performance.

Luckily, most systems come with a an area mounted in memory already – so you don’t even need to configure it!

cd /dev/shm

If said directory exists, you’ll have a memory mounted directory already and can start using it immediately.

Installing new memory

Unpack the RAM (random access memory) and check with the motherboard’s manual to work out which is the first slot (slot 0). When you insert the memory you want to fill it up numerically: 0, 1, 2, and so on.

To insert the memory push the white clips at the end outwards then simply slot in the memory sticks into the slots. The clips will automatically lock back into place when you have pushed the memory stick far enough into the slot.