Skip to content

Prevent Data from exceeding Database constraints #188

Closed

Description

@s0t7x

I recently encountered an issue with large data. A workflow infinitely looped. The first Activity was started and after execution the workflow just dropped out. Any code after that never got executed. Then the workflow restarts. No logs, no messages, no failed state. Just completed everything without anything happening.

Well... The logging failed because the data size produced by the activity exceeded the limit of the TEXT column in the workflow_logs table of the database, which led to the application not functioning as expected without any reasonable logs. I manually altered the database schema to use LONGTEXT to resolve the issue.

I would like to suggest implementing a soft limit for the size of data that is written to the database. If the log exceeds the max characters of TEXT, the system should at least log a warning indicating that the database write could fail due to size constraints beforehand.

Alternatively, a hard limit could be enforced, where an exception is thrown if the data exceeds the maximum allowed size. This would help to prevent unexpected behavior.

Maybe you could also consider using LONGTEXT instead of TEXT for columns that may store large data.

Anyways I mostly do leave this here to help folks with a similar problem.
Thanks for your great package!

Activity

  1. locked and limited conversation to collaborators on Feb 21, 2025
  2. converted this issue into a discussion #207 on Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions