-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
HTTPClient POST larger files doesn't work anymore. #2437
Comments
Yes, lots of major changes in WiFiClient. |
sure. Im just creating a minimal example. Will come back as I know more! |
I cant reproduce it currently and assume the problem is outside the arduino code. |
OK its getting more confusing ! I tried the same code in 4 different networks - in 3 of 4 it works just fine. Switched the router and still the same.. hard to track this one down, but with stable version it works in 4 of 4. Any hints how to debug welcome.. Im a bit lost here. |
The issue appears in this part of ClientContext.h
And to be more exact - in the "write_some" function -
The tcp_sndbuf returns 0 ( size_t can_send = tcp_sndbuf(_pcb);) after some packets and following the connections times out. This one is going deeper into the rabbit hole... So the tcp_write is appearently filling the buffer until its full... Any ideas ? |
I'm having similar reports on the Async side with some networks and over 3G. So far the problem is that the other end does not respond with ACK and lwip is holding the packets. |
ok glad Im not alone ;) Link to the according AsyncTCP issue: me-no-dev/ESPAsyncTCP#20 |
what are our options though? If I figure out how to clear the lwip buffer and let other data be sent, what is the assurance that that will work and what will happen in cases where the other end is actually gone and there is nobody to take the data. |
@comino can you take tcpdump with the packets so we can look at such transfer? |
@comino is the router that have problems a pppoe router? Can you check it's MTU? |
Im just trying to convince wireshark to show me any packets. Somehow I cant capture the packets from. I will oost them here as I get it to work. To be honest I have very little information about the router - its: CH7466CE and Google doenst tell me what conenction method its using. Edit: |
It's been some time, but afaik the issue is still alive. The issue has been discussed here: Currently I have this issue in only one network I have access to. Its using a Cisco Router with an MTU of 1450. Citation of @me-no-dev : Might be solved with: |
The LwIP version distributed with non-OS SDK 2.1.0 also includes these (possibly relevant) changes: Which are referred to as "Fix MTU negotiate bug" in the release notes. |
@igrr is this part of the 2.4.0 milestones? |
Unfortunately i don't see a remedy for this other than updating LwIP, which
we have agreed to hold off until next+1.
…On Sat, Oct 14, 2017, 00:08 Develo ***@***.***> wrote:
@igrr <https://github.com/igrr> is this part of the 2.4.0 milestones?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2437 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEJcevdvLdEvruKK8p-_dU4RR54WZGQPks5ssDPSgaJpZM4Js8gn>
.
|
I know it has been some time over the last post, but I am trying to post a csv file (which rests on the SD card) to one of our servers and I am kind of stuck on a similar error. The posting works fine if I generate the POST request string manually and write the file byte by byte into the client using a The code that I use for testing on a NodeMCU ESP8266 is as follows (I just removed the server address):
You may see the serial output of the code in here: I am now planning to see if the other library methods |
Closing due to age and lack of feedback. Also, lwip2 is now well tested and is the default. |
Basic Infos
ESP8266HTTPClient: TCP socket hangs up at sending larger files with.
With stable version is was working just fine even with very large files so it was introduced lately.
Hardware
Hardware: ESP-WROOM2
Core Version: latest github
Description
Im using HTTPClient.sendRequest("POST", file).
With smaller files <1kB it works just fine. With larger files ~50kB it failes with HTTPC_ERROR_SEND_PAYLOAD_FAILED after a long timeout.
The error occurs in this part of the code:
L492-499 ESP8266HTTPClient.cpp
Output
"short write, asked for 1460 but got 0 failed"
So there is no more data send via "_tcp->write()" after ~4kB
Any major change in the WiFiClient which may cause this?
The text was updated successfully, but these errors were encountered: