Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When submitting traces, response will come back 1 byte at a time #464

Closed
tinycogio opened this issue May 15, 2018 · 3 comments
Closed

When submitting traces, response will come back 1 byte at a time #464

tinycogio opened this issue May 15, 2018 · 3 comments
Assignees

Comments

@tinycogio
Copy link

strace of our uwsgi process

[pid 10885] 23:23:15.735284 sendto(11, "PUT /v0.3/traces HTTP/1.1\r\nHost: localhost:8126\r\nAccept-Encoding: |snip|  

[pid 10885] 23:23:15.735448 recvfrom(11, "H", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.735869 recvfrom(11, "T", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.735955 recvfrom(11, "T", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.736032 recvfrom(11, "P", 1, 0, NULL, NULL) = 1
|snip|
[pid 10885] 23:23:15.743480 recvfrom(11, "\r", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.743549 recvfrom(11, "\n", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.743627 recvfrom(11, "\r", 1, 0, NULL, NULL) = 1
[pid 10885] 23:23:15.743697 recvfrom(11, "\n", 1, 0, NULL, NULL) = 1

It seems it's due to httplib behavior:

conn.request("PUT", endpoint, data, headers)

https://stackoverflow.com/questions/14519829/python-httplib-getresponse-issues-many-recv-calls

Ubuntu 16.04
Python 2.7.12

ddtrace==0.11.0
Django==1.11.13
uwsgi==2.0.17

Also opened a similar issue for the datadog python project: DataDog/datadogpy#270

@Kyle-Verhoog
Copy link
Member

Kyle-Verhoog commented Aug 3, 2018

Hi @tinycogio! Can you confirm that #527 solves the issue on your end? The fix is included in kyle-verhoog/464. You can install this branch via:

pip install git+https://github.com/DataDog/dd-trace-py.git@kyle-verhoog/464

@tinycogio
Copy link
Author

@Kyle-Verhoog seemed to work - thanks!

recvfrom(12, "HTTP/1.1 200 OK\r\nDate: Fri, 03 Aug 2018 19:30:20 GMT\r\nContent-Length: 3\r\nContent-Type: text/plain; charset=utf-8\r\n\r\nOK\n", 8192, 0, NULL, NULL) = 119

@Kyle-Verhoog
Copy link
Member

@tinycogio great! We'll include the patch in an upcoming release. Thanks for reporting and the quick follow-up 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants