简体   繁体   中英

Why is my JSON from Django being cut-off at about 2.1MB?

I have a Django app, and an Ajax response ( to a POST ) that contains 2.8MB of JSON The JSON is valid when it leaves the server, but when the browser gets it ( jQuery 1.9 ), it has been truncated to approximately 2.1MB (and fails to parse). The exact size varies -- see the numbers below.

SENT:
2806260

RECIEVED:
2157907
2133383
2149795
2138351
2135271
2137015
2134291

Smaller responses work perfectly fine -- it's just this big one that gets cut-off.

The recieved size always seems to be an odd number, and maybe I am going crazy here, but they all seem to be either prime numbers or multiples of large prime numbers. Is this really true? Is it a coincidence? What is truncating my JSON?

( RHEL6.5 64bit, python2.6, django1.6, jquery1.9 )

There is no timing data, but it looks like this might be timeout related. Check how long it takes until you get the truncated response, and look for similar timeout on the server side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM