Failed to JSON parse a line from worker stream

I’m using ansible Ansible AWX version- 23.6.0
I’m executing a python script from a playbook the task is mentioned below.

  • shell: python3 automation/myScript.py
    register: output

  • debug:
    msg: “{{output}}”

In python script I’m reading data from “Incident” table(MSSQL DB) and printing it. When script is attempting to print the table’s data after fetching it from the table, the job is getting hard stopped without executing the complete playbook with errors.

error: Failed to JSON parse a line from worker stream. ErrorInvalid \escape: line 1 column 32804(char 32803) line with invalid JSON data: …

I’m facing the same issue with couple of other usecases on my newly deployed awx instance, but when I’m executing the same playbook on some other awx instance it’s working there.
Not sure what configurations I’ve missed and how to fix it. It seems like it has something to do with the char limit or the length of output or the data which is be processed.