Skip to content

Keep uwsgi plugin from crashing the agent#463

Open
patrick-minted wants to merge 1 commit intoMeetMe:masterfrom
patrick-minted:try_except_ftw_wtf
Open

Keep uwsgi plugin from crashing the agent#463
patrick-minted wants to merge 1 commit intoMeetMe:masterfrom
patrick-minted:try_except_ftw_wtf

Conversation

@patrick-minted
Copy link

Uwsgi plugin sometimes receives truncated data back from the uwsgi
stats server. When this happens, json.loads() fails to process the
data, and throws an exception. This bubbled up all the way to the
main python process and halted the agent.

IMO, this should not be an agent-killing problem. Wrapping json.loads()
with a try-except block and giving it some default behavior keeps it
from exploding when it recieves bad data.

Uwsgi plugin sometimes receives truncated data back from the uwsgi
stats server. When this happens, json.loads() fails to process the
data, and throws an exception. This bubbled up all the way to the
main python process and halted the agent.

IMO, this should not be an agent-killing problem. Wrapping json.loads()
with a try-except block and giving it some default behavior keeps it
from exploding when it recieves bad data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant