phpmyadmin/error-reporting-server

Truncation on too long full report

nijel opened this issue · 3 comments

nijel commented

Error from production environment:


2017-05-09 07:40:57 Error: [PDOException] SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'full_report' at row 1 in /home
/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php on line 39
Request URL: /incidents/create
Client IP: [hidden]
Stack Trace:
#0 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php(39): PDOStatement->execute(NULL)
#1 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Connection.php(313): Cake\Database\Statement\MysqlStatement->execute()
#2 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Query.php(213): Cake\Database\Connection->run(Object(Cake\ORM\Query))
#3 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1916): Cake\Database\Query->execute()
#4 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1810): Cake\ORM\Table->_insert(Object(Cake\ORM\Entity), Array)
#5 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1723): Cake\ORM\Table->_processSave(Object(Cake\ORM\Entity), Object(A
rrayObject))
#6 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1446): Cake\ORM\Table->Cake\ORM\{closure}()
#7 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Connection.php(680): Cake\ORM\Table->Cake\ORM\{closure}(Object(Cake\Databa
se\Connection))
#8 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1447): Cake\Database\Connection->transactional(Object(Closure))
#9 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/ORM/Table.php(1724): Cake\ORM\Table->_executeTransaction(Object(Closure), true)
#10 /home/reports/error-reporting-server/src/Model/Table/IncidentsTable.php(171): Cake\ORM\Table->save(Object(Cake\ORM\Entity))
#11 /home/reports/error-reporting-server/src/Controller/IncidentsController.php(34): App\Model\Table\IncidentsTable->createIncidentFromBugReport(Array
)
#12 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Controller/Controller.php(440): App\Controller\IncidentsController->create()
#13 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(119): Cake\Controller\Controller->invokeAction()
#14 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(93): Cake\Http\ActionDispatcher->_invoke(Object(App\Cont
roller\IncidentsController))
#15 /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(60): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Http\
ServerRequest), Object(Cake\Http\Response))
#16 /home/reports/error-reporting-server/webroot/index.php(36): Cake\Routing\Dispatcher->dispatch(Object(Cake\Http\ServerRequest), Object(Cake\Http\Re
sponse))
#17 {main}
nijel commented

Here is sample report which is too big, seems that just there were way too many errors:

report.txt

How do you think we should handle these type of reports? I am not very keen to just ignore these completely, but again storing these in a complete state in database is not a very plausible option. Slightly clueless regarding this. :-/

nijel commented

I think truncating the errors data (in sense of parsing JSON and using only first array elements) is reasonable approach in this case. Anyway the first error probably will be the most interesting one.