Good day,
I have Multiple database errors DB Error #1146.
One of them look like this:
[SELECT A1.* FROM ost_file A1 LEFT JOIN ost_attachment A2 ON (A1.id = A2.file_id) LEFT JOIN ost_thread_entry A3 ON (A2.type = 'H' AND A2.object_id = A3.id) LEFT JOIN ost_thread A4 ON (A3.thread_id = A4.id) WHERE A4.id = 70521] Table 'osticketdb.ost_file' doesn't exist

---- Backtrace ----
#0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1146', '[SELECT A1.* FR...')
#1 (root)/include/class.orm.php(3133): db_query('SELECT A1.* FRO...', true, true)
#2 (root)/include/class.orm.php(3180): MySqlExecutor->execute()
#3 (root)/include/class.orm.php(1771): MySqlExecutor->getArray()
#4 (root)/include/class.orm.php(1815): ModelInstanceManager->{closure}()
#5 (root)/include/class.orm.php(1794): CallbackSimpleIterator->next()
#6 (root)/include/class.orm.php(1803): CallbackSimpleIterator->rewind()
#7 (root)/include/class.orm.php(1463): CallbackSimpleIterator->valid()
#8 (root)/include/class.orm.php(1480): CachedResultSet->fillTo(9223372036854775807)
#9 (root)/include/class.orm.php(1149): CachedResultSet->asArray()
#10 (root)/include/class.thread.php(251): QuerySet->all()
#11 (root)/include/staff/ticket-view.inc.php(508): Thread->render(Array, Array)
#12 (root)/scp/tickets.php(492): require_once('(root)/i...')
#13 {main}

    blackviewza

    As the error states you are missing the entire ost_file table. This is a mandatory table and is created on installation. Something must’ve happened to your instance as you no longer have that table. Could be that MySQL crashed and couldn’t recover the table, could be someone or something deleted it, etc. There is no way for us to tell what happened here.

    You will need to reach out to your server admin to see what happened and see if you can recover from a previous backup where the table hasn’t been deleted.

    Cheers.

    Hi Kevin,

    Thank you, I will have to take a look deeper, seems like I recover it every now and then when the server reboots. Its all there and working and suddenly half of the system is not functional. After a reboot, its back up.
    Thank you

    Write a Reply...