Opened 5 years ago

Closed 5 years ago

#13817 closed (wontfix)

Error message when cache.set has trouble.

Reported by: ezimir Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I am using low-level cache in my app, there were some cases when the cache.set method reported the TransactionManagementError: This code isn't under transaction management error, because (I guessed) that there is some underlying DB execution error.

I managed to find out what that original error was (with PDB) (and solve the problem):
OperationalError: (1153, "Got a packet bigger than 'max_allowed_packet' bytes")

Now, is there a way to retrieve the original error from code? Is there a way to tell Django not to try to rollback that unsuccessful query? Is it a bug (i.e. Django shouldn't try to rollback code that is not under transaction management)? Is it a version specific problem?

django.VERSION is:
(1, 1, 1, 'final', 0)
django.get_version() says:
1.1.1 SVN-865

Thank you for your time.

Change History (1)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

As of Django 1.3, key length is validated before use, so this error shouldn't occur any more.

Note: See TracTickets for help on using tickets.
Back to Top