HI
I am downloading emails and inserting their attachments into a postgres database.
db.define_table('e_attachment',
Field('e_mail_id','reference e_mail',required=True),
Field('e_file_name','string', length=SHORT_STRING),
Field('e_file_pt','upload',uploadfield='e_file'),
Field('e_file', 'blob') )
This works.
Mostly.
But sometimes the database seems to seize up and for some reason a new record cannot be inserted.
Even for something simple like:
db.define_table('errors',
Field('description','text',length = 1024))
The error originates with a blob insertion of a microsoft office file of about 1.1M in length.
try:
db.e_attachment.insert(...)
except:
error_msg="..."
db.errors.insert(error_msg)
Even trying to insert into the errors table produces an error.
The traceback for both insertions look like this:
File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 734, in insert
ret = self._db._adapter.insert(self, row.op_values())
File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line 486, in insert
raise e
InternalError: current transaction is aborted, commands ignored until end of transaction block
Has anyone experienced this too?
P.S. Version is
2.15.3-stable+timestamp.2017.08.07.07.32.04
(Running on nginx/1.10.3, Python 2.7.12)