Skip to content

[BUG] value too long for type character varying(4096) #42

@iziang

Description

@iziang

celery reported the following error:

[2023-07-13 09:14:19,770: ERROR/ForkPoolWorker-2] Task kubechat.tasks.index.add_index_for_document[9caed586-b81b-48f4-8ca9-abba8cbc584e] raised unexpected: DataError('value too long for type character varying(4096)\n')
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(4096)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
  File "/app/kubechat/tasks/index.py", line 71, in add_index_for_document
    document.save()
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/base.py", line 814, in save
    self.save_base(
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/base.py", line 877, in save_base
    updated = self._save_table(
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/base.py", line 990, in _save_table
    updated = self._do_update(
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/base.py", line 1054, in _do_update
    return filtered._update(values) > 0
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/query.py", line 1231, in _update
    return query.get_compiler(self.db).execute_sql(CURSOR)
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1984, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/opt/conda/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
    cursor.execute(sql, params)
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
    return super().execute(sql, params)
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/opt/conda/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/conda/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(4096)

[2023-07-13 09:14:19,771: WARNING/ForkPoolWorker-2] value too long for type character varying(4096)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions