# Error: Log table "log" is full

**URL:** <https://community.open-emr.org/t/error-log-table-log-is-full/8419>\
**Category:** Management and Administration\
**Tags:** question\
**Created:** [April 21, 2017, 12:05pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419 "2017-04-21T12:05:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [April 21, 2017, 12:05pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/1 "2017-04-21T12:05:49Z")

</div>

WAMP 3.0.8  
MySQL 5.7.11  
PHP 7.0.4  
Apache 2.4.18

I am trying to upgrade from 4.2.2 to 5.0.1 and when I ran the sql\_upgrade.php. I received this error message.

ALTER TABLE `log` ADD `category` varchar(255) default NULL  
ERROR: query failed: ALTER TABLE `log` ADD `category` varchar(255) default NULL

Error: The table ‘log’ is full

C:\emr\_wamp\www\openemr-5\library\sql\_upgrade\_fx.php at 675:sqlStatement  
C:\emr\_wamp\www\openemr-5\sql\_upgrade.php at 56:upgradeFromSqlFile(4\_2\_2-to-5\_0\_0\_upgrade.sql)

QUESTION:  
Should I backup the table that has over 35 million records in it, then truncate the table?

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 22, 2017, 7:58am UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/2 "2017-04-22T07:58:18Z")

</div>

Hi @juggernautsei ,

Two things to note here:

1. There is a mechanism to backup and clear the log tables (note there is more than 1 log table, so good to use that process) at Administration-\>Backup-\>Create Eventlog Backup

2. There are a list of things that can cause the full error in mysql. Check out these pages:  
[https://dev.mysql.com/doc/refman/5.7/en/full-table.html](https://dev.mysql.com/doc/refman/5.7/en/full-table.html)  
[https://dev.mysql.com/doc/refman/5.7/en/table-size-limit.html](https://dev.mysql.com/doc/refman/5.7/en/table-size-limit.html)  
[https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html](https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html)

-brady

---

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [April 22, 2017, 1:32pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/3 "2017-04-22T13:32:12Z")

</div>

I added the [archive/TAR.php](https://github.com/pear/Archive_Tar/blob/master/Archive/Tar.php) and [PEAR.php](https://pear.php.net/package/PEAR/download/1.10.2) files to my windows server and ran the script. It produced this.

“C:/xampp/mysql/bin\mysqldump -u “tom-tom-4321” -p"QNeYYdsGLH7b5C6z” --opt --quote-names -r C:/windows/temp/emr\_eventlog\_backup/eventlog\_20170422\_131807.sql “openemr5p” --tables log\_comment\_encrypt\_backup log\_backup log\_validator\_backup" returned 1:

The folder was created but it seems the system assumes that XAMPP will be used. I have not dug in to see where this veriable is being filled. I personally don’t use xampp.

I was getting the full message because the folder mounted drive that I am storing the database in was full. I under estimated how fast the database was going to grow and some other things and so once I cleared the databases not need and the log tables. The upgrade when through.

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 22, 2017, 8:57pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/4 "2017-04-22T20:57:21Z")

</div>

Hi @juggernautsei ,  
I am pretty sure the temp path variable is set at Administration-\>Globals-\>Miscellaneous-\>Path to Temporary Files  
-brady

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [April 22, 2017, 8:59pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/5 "2017-04-22T20:59:12Z")

</div>

@juggernautsei ,  
Also can find the ‘Path to MySQL Binaries’ and ‘Path for Event Log Backup’ settings in the same Miscellaneous section.  
-brady

---

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [April 23, 2017, 11:37pm UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/6 "2017-04-23T23:37:30Z")

</div>

Thanks for reminding me…

---

<div class="post-metadata">

**Author:** ![mytilene](https://community.open-emr.org/user_avatar/community.open-emr.org/mytilene/32/14939_2.png) [@mytilene](https://community.open-emr.org/u/mytilene)\
**Post date:** [November 18, 2022, 9:31am UTC](https://community.open-emr.org/t/error-log-table-log-is-full/8419/7 "2022-11-18T09:31:14Z")

</div>

Can I just truncate log\_comment\_encrypt?  
Will it cause error?  
Because my log table is too large and cannot make backup.
