-
Notifications
You must be signed in to change notification settings - Fork 85
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
[BUG] HTTP down #299
Comments
Hmm, odd, we had this ages ago on older code with an app using the legacy URLs, but fixed long ago. Try just power cycling or sending Try web via IP not URL/domain in case an mDNS issue. |
Sorry I didn't specify that yes I do use direct ip address to connect to the device. |
Ok not sure, as I say, only seen with some very specific (and now fixed) legacy IP polling. See if its happens again. |
Sure, I'll keep an eye on this, and keep you updated, thanks sir you awesome! |
Hello there again, just a heads up, I got my second device to also "http fail", and I, again, fix it by mqtt restart, and now my 3rd device is in that state too. EDIT: Just wanted to share the status, if no one else is experience this, maybe it's something in my setup |
Are you using the legacy URLs / polling them? |
I just navigate to http://ipaddress in the browser, it usually just works. |
OK but no tools, HA plug-ins, or something, that may be accessing the legacy URLs for data? |
No that Iam aware of, just HA through MQTT, nothing going for the HTTP besides my browser that I rarely use. |
OK, as I know some HA plug-ins use the old URLs, but if using MQTT, that should be fine. Which leaves my rather puzzled at the issue, to be honest. |
It also looks timed, one failed, reboot, about 3/5 days passed by, and then the other one, and repeat. Now is the 3rd one (of 3) I can just reboot it via MQTT too and see if they start from the first one that failed. To give you more of hindsight, I do have a more-than-average network, the Faikins also are in a restricted network, with some cameras in the same segment, with only access to HA trough MQTT, the web access from my computer, and to your update server. I do have some plug-ins in HA, but that were for the "official" modules, and they were assigned different IP addresses, and I dissconect them from the units, so I don't think that could be an issue. |
I have more information to share, it happened again, this time to 2 of the 3 devices I have. It happened just after I changed the wifi band on my AP, does that ring any bell? Again after sending a MQTT reboot the website goes online. I must add I live in an appartment that is very noisy wifi wise. |
This has just happened to me. The device is online - responds to pings, nmap can see it but not analyse it, it works on mqtt, but the webserver times out. Addressed by ip address. Webserver is up again after an mqtt restart. Uptime was a few days. |
Just to check, are you using the legacy URLs? We think, somehow, there is a memory leak, possibly in the ESP IDF. |
I'm not sure what you mean by legacy URLs. I'm using the IP address (192.168.0.150) directly. |
I.e. a monitoring app that talks http to Faikin to get/set data. The way the old Daikin wifi modules used to work. |
I'm using Firefox to read from http://192.168.0.150 (the Faikin) on one computer. The page appears to be refreshed at intervals. I have not disconnected the original Daikin wifi module, but that has never been used, and the Daikin app is not available here. |
OK sounds like you are not using the legacy HTTP API then. The web page on the Faikin is not "refreshed" it uses a web socket. It should have no problem working indefinitely. I'm puzzled if you think it is being refreshed. When we have seen issues with web server stopping it has always been down to someone using some app (not the Daikin app, usually some home assistant plug in that is not using MQTT). That polls the HTTP legacy APIs constantly, and we think there is some memory leak issue from that, but not 100% sure. If you are not doing that, it is the first case of a problem like this. Can you check the settings / basic page occasionally and see if the memory figures on that page are going down over time? |
First off, thanks for the prompt replies - I'm very impressed! |
Have a good night. The fact this is not using legacy HTTP APIs is interesting, and so may give us clues. |
Here are some preliminary results from status/faikin - are these what you need to see?: |
Ah prefect yes mem and SPI, over time. |
No http hangs for several days! |
MQTT is working fine. BUT although HTTP is working on one device I cannot connect on a second device. Current status: |
OK, that means it is not a memory leak. I'll have to look at number of TCP sockets or something. Does it eventually recover, or does it need a restart? |
The working one worked for some hours. But it has also just stopped. It stopped with just the blue background page and 'settings....' at the bottom left, so no updating. So now no http connection on either, but pings and mqtt work fine. |
This sounds a lot like a TCP related issue. I'll have to have a play with the options. |
There's no need for any special HA work, the data is available. eg one of my Faikins has the name faikinliving, which it publishes data to MQTT on. The topic needed is state/faikinliving and the memory field is (correct me if I'm wrong) the json field "mem" So in my HA configuaration.yaml I have the line
and in my mqtt.yaml I can put
and then I have the sensor called sensor.faikinliving-mem which can be graphed. |
@PianSom good tip, thanks. PS: unique id might be in the form |
OK a simple setting in next beta to turn this on in HA. |
pl consider restart button in same way #657 😉 |
@macmpi , have you noticed the HTTP failure as frequently with the newer ca0777 2025-02-19 version? I encountered the HTTP failure (which required a restart via MQTT) with the version prior to this many times. Sometimes it happened within a day, and other times after 2 or 3 days. Since updating to the newer version, I haven’t experienced the full HTTP lockup that required a restart via MQTT in about two weeks. There have been occasional delays (around 10-15 seconds with the |
Bear in mind I do update the ESP IDF periodically as well, I think I usually mention in release notes, so bugs or leaks in underlying http server may get fixed. |
Odd as default malloc is meant to get from PSRAM anyway (not sure it does). A dip like that is usually only when doing s/w upgrade. |
So had to reset...
|
None of that is remotely low enough to be an issue - I assume PSRAM remains high. And also it is recovering, which suggests no actual leak. |
Really?... 😲 |
Yes, I expect to see a leak as a gradual trend over days. The individual accesses will use memory in various ways and the logs are a per minute snapshot. It may be every access needs that much memory and you caught just one of them. Indeed, I would be amazed in an http page serving using only 10kB. |
I can only provide traces I'm given. |
Err, in my judgement.
So the code to provide relevant information per my judgement is there for that! |
Ok, whereas there should not be a bug, it positively seems there is one right? |
Feel free to find the bug and do an MR. I still have not reproduced it, but a memory leak is one thing to consider, and one that will take some days off trends to see. |
I think there is a misunderstanding: how do you interpret the first trace -long version, knowing that:
Isn't the mem pattern from 11h15-to-end unexpected? |
Only to encourage the fix: Three (out of three) Faikins around me face the same issue. I try to avoid using the HTTP page as much as possible; otherwise, a restart is needed every 30 minutes. Very unstable and annoying:( |
I would love to get to the bottom of this - are the new RAM/PSRAM HA graphs showing memory leaks at all? |
Can't find new sensors on HA. Updated to 7a94561 beta, restarted HA. |
There is a setting to enable it |
FWIW enclosing few data points with provided sensors during problematic homepage accesses under 7a94561 (seems to be more frequent when using mdns based address) |
I am not 100% sure of reliability of MDNS, so yes, can we avoid using MDNS for these tests so we focus on one thing. |
same with 7a47974 history.csv |
I have just done a beta with more httpd stack |
Yes and previous comment was report after that beta (notice commit version) 😉 |
Well it was worth a try. |
re mDNS: it seems it got bumbed |
I do update esp idf from time to time as well. |
Faikin hardware
Faikin-S3-MINI-N4-R2: 91c1bc5 2024-03-31T10:59:15 S21 from Amazon
Daikin hardware
FTXP35N5V1B via s403
Describe the bug
The website goes down, I can control the unit via MQTT and ping it, but no HTTP or whatsoever
To Reproduce
No idea, happened out of the blue, I waited to see if it comes back but no dice.
Expected behavior
Have the web service working, I searched for a reboot via MQTT to see if that fix it, but found none.
Additional context
I have 3 of them, all of them configured and setted up the same day, only one of them failed
The text was updated successfully, but these errors were encountered: