./bin/storage upgrade EXCEPTION Table 'repository_refcursor' is full

When running

./bin/storage upgrade

I get the following exception:

Applying patch "phabricator:20170915.ref.04.uniq.sql" to host "localhost"...
[2019-01-21 18:58:35] EXCEPTION: (AphrontQueryException) #1114: 
The table 'repository_refcursor' is full at 
[<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:358]

I’ve tried ./bin/storage destroy but that did nothing.

What does this command show on the MySQL server machine?

$ df -h

| Filesystem | Size | Used | Avail | Use% | Mounted on
| udev | 3.4G | 12K | 3.4G | 1% | /dev
| tmpfs | 697M | 416K | 697M | 1% | /run
| /dev/xvda1 | 7.9G | 3.0G | 4.5G | 40% | /
| none | 4.0K | 0 | 4.0K | 0% | /sys/fs/cgroup
| none | 5.0M | 0 | 5.0M | 0% | /run/lock
| none | 3.5G | 0 | 3.5G | 0% | /run/shm
| none | 100M | 0 | 100M | 0% | /run/user
| overflow | 1.0M | 60K | 964K | 6% | /tmp

image

The most common reason for this error is that your disk is full, but that doesn’t seem to be the issue in your case.

Since the disk isn’t full, I’m not sure how to reproduce this issue.

This is the whole thing: