What I’m trying to do:
I just had 3 separate failures with “Data payload too big - please use Media objects to transfer large amounts of data.”.
Two were background tasks (for one i have the task id: d62kxprzoxqjeweltx6wbpeupakazrai4md54sir for the other i have the session: MDZJJQWDP564NAQETYWZBGPRJCKR7X4Y) that do not have big payloads being sent back and forth. The third was a user session which was on a fn that sends back almost no data at all (50 chars) (UZJWH72A5KC4NLG7FA6AWDFAO7JJ6R75).
Is it possible this was a brief outing of anvil or is it something else? Any advice?
This guy also crashed with the same message at the same time: UZJWH72A5KC4NLG7FA6AWDFAO7JJ6R75 (another background task)
What’s the exact size of the payload?
Difficult to say, as it does not tell me. The background tasks just failed (without there being any large data they send) and I have no info as to where they failed. They run thousands of times though and have never had this issue.
The user session was calling a server function that returns one of the following:
{“status”: “completed”,“max_page_num”: max_page_num,“message”: “Schritt 2/2: Anki Buddy erstellt deine Karten…
”}
{status": “completed”, message": “Schritt 2/2: Anki Buddy erstellt deine Karten…
”}
(max_page_num is an integer)
from pympler import asizeof
data = {"a": [1, 2, 3], "b": (4, 5)}
size = asizeof.asizeof(data)
print(f"Full size: {size} bytes
Try run this on the object before you send it