Skip to content
TORNLIFE More

Incomplete API Responses

Started by Marches [3131483] on in Bugs & Issues.

13 replies · 275 views · thread synced · 5 days ago · View on torn.com
About this thread

Posts archived: 14 / 14 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
14
Discussion span
→
People posting
11
Likes on archived posts
17
Posts by staff, officers and moderators
4
Authority score
60 / 100
Historical score
33 / 100
Story score
45 / 100
Engagement score
60 / 100

Most-liked replies

Marches [3131483]
Hi,

Members of the Torn API Discord and I have noticed that the JSON being returned from API responses is being truncated and not sending the full content.

[image: i.imgur.com]

It seems inconsistent - after getting this error, trying the same API call a few seconds later will return the complete content.

I think it was first seen yesterday? As of 2024-05-05 09:18:35 TCT, it's still happening.
Thunderkill [3201787]
I can also vouch for this, since yesterday I have also noticed some API calls returning incomplete responses.

I have noticed this with user requests with big bazaars or when fetching faction data (with members). I have not yet figured out why and when this happens
Chedburn [1] Admin Developer
I'm unable to reproduce this, I.e. Running this large request many times: https://api.torn.com/torn/?selections=items&key=

If you see this error again, please provide the Cf-Ray in the Response Header, we should then be able to track the error causing this.
Heasleys4hemp [1468764] Committee Committee
My faction's discord bot was having a similar issue as well, but I've only experienced it with faction calls. Occasionally it was returning no data at all. Perhaps you can look into the faction call specifically?

https://api.torn.com/faction/?selections=basic,currency,donations&key=
Summers [1939437]
In case it's useful to have more than one - here's another Cf-Ray from a request w/ a truncated response:

87f9b7f018e08c99-EWR

Encountered while polling `https://api.torn.com/faction/?selections=timestamp,basic,crimes`
Stig [2648238]
06-May-24 18:33:06: API Request Error: Unterminated string starting at: line 1 column 14479 (char 14478) | CF-RAY: 87fb0e6d5a8037f0-FRA
06-May-24 18:33:07: API Request Error: Unterminated string starting at: line 1 column 14480 (char 14479) | CF-RAY: 87fb0e6d5bc29bbe-FRA
06-May-24 18:33:18: API Request Error: Expecting ':' delimiter: line 1 column 14481 (char 14480) | CF-RAY: 87fb0eba8dc93637-FRA
06-May-24 18:33:30: API Request Error: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://api.torn.com/user/1307007?selections=profile,properties&key=XXX') | CF-RAY: 87fb0e645c5c1c05-FRA
06-May-24 18:33:40: API Request Error: Unterminated string starting at: line 1 column 24612 (char 24611) | CF-RAY: 87fb0f3989069b7d-FRA
06-May-24 18:33:41: API Request Error: Unterminated string starting at: line 1 column 14475 (char 14474) | CF-RAY: 87fb0f42df965d78-FRA
06-May-24 18:33:41: API Request Error: Unterminated string starting at: line 1 column 14479 (char 14478) | CF-RAY: 87fb0f42db05a020-FRA
06-May-24 18:33:44: API Request Error: Expecting ':' delimiter: line 1 column 53041 (char 53040) | CF-RAY: 87fb0f39a9debbe5-FRA
06-May-24 18:33:57: API Request Error: Unterminated string starting at: line 1 column 14479 (char 14478) | CF-RAY: 87fb0fa65b45a022-FRA
06-May-24 18:33:59: API Request Error: Unterminated string starting at: line 1 column 14477 (char 14476) | CF-RAY: 87fb0fb4cc0f8c52-FRA
06-May-24 18:34:17: API Request Error: Unterminated string starting at: line 1 column 20265 (char 20264) | CF-RAY: 87fb1030ef34377b-FRA
06-May-24 18:34:18: API Request Error: Unterminated string starting at: line 1 column 14475 (char 14474) | CF-RAY: 87fb10305d209042-FRA
06-May-24 18:34:19: API Request Error: Unterminated string starting at: line 1 column 20267 (char 20266) | CF-RAY: 87fb1030eeba9b1b-FRA
06-May-24 18:34:19: API Request Error: Unterminated string starting at: line 1 column 14476 (char 14475) | CF-RAY: 87fb1030e8559b31-FRA
06-May-24 18:34:19: API Request Error: Expecting value: line 1 column 14481 (char 14480) | CF-RAY: 87fb1030ef5f3737-FRA
Chedburn [1] Admin Developer
One of the API pods was running on a new graviton instance which suddenly started producing occasional 'out of memory' errors. It looks like that was the issue, and it's been removed from the pool. We still intend on migrating all API pods over to graviton instances so it'll be worth us trying to figure out what was going wrong there.