You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had noticed from time to time that the Configuration webpage would be corrupted when displayed. This problem became worse when changes were made to accommodate the new PCF8574 functionality. On investigation I found that many re-transmit errors were occuring, particularly with with Configuration page (which has the largest HTML/javascript content of all the webpages). The problem appears to be that various timeouts, in particular the re-transmit timeout (rto), were occurring very often, and when a large number occurred webpage display could be corrupted. I traced this issue to the frequency of the periodic_service() routine, which is used as the "timer" in the uip code.
The periodic_serivce() routine is called primarilly by the periodic_timer_expired() function. I recall decreasing this timeout long ago when I was attempting to improve webpage display timing and MQTT timing. On looking at code it appears I improved the MQTT timing by adding a periodic_service() call whenever publish_outbound() is called - so that was probably my ultimate fix for MQTT timing improvement. However, it looks like I left the periodic_timer_expired() time at about 20ms, which in turn is causing the re-transmit errors.
I've changed the periodic timer to expire at 80ms, which appears to have completely eliminated the retransmit timeout problem. However, the way the code is designed right now I can see the possibility that with very heavy MQTT traffic the uip retransmit timeout problem could reoccur.
So, two outcomes:
The current change, while appearing to fix the retransmit problem, might have changed MQTT timing a little. Some users may have to re-test if they are very sensitive to MQTT performance. From code examination I don't think there will be any difference.
Going forward I may have to look more closely at the periodic_service() routine and see if I can separate the way MQTT and Browser traffic is handled.
The text was updated successfully, but these errors were encountered:
#115 "How to enhance the needed pins for sensors? Can the PCF8574 module be useful?"
#120 "Pin order as build options"
#141 "Selectable pinout branch"
#142 "Added REST command /50 (at /80)"
#143 "Linked pins check in check_runtime_changes() should be in check_eeprom_settings()"
#144 "periodic_service() function is running too often"
#145 "Timer error has gradually increased - need improved time keeping function"
#146 "Incorrect content-length for most pages returning content"
I had noticed from time to time that the Configuration webpage would be corrupted when displayed. This problem became worse when changes were made to accommodate the new PCF8574 functionality. On investigation I found that many re-transmit errors were occuring, particularly with with Configuration page (which has the largest HTML/javascript content of all the webpages). The problem appears to be that various timeouts, in particular the re-transmit timeout (rto), were occurring very often, and when a large number occurred webpage display could be corrupted. I traced this issue to the frequency of the periodic_service() routine, which is used as the "timer" in the uip code.
The periodic_serivce() routine is called primarilly by the periodic_timer_expired() function. I recall decreasing this timeout long ago when I was attempting to improve webpage display timing and MQTT timing. On looking at code it appears I improved the MQTT timing by adding a periodic_service() call whenever publish_outbound() is called - so that was probably my ultimate fix for MQTT timing improvement. However, it looks like I left the periodic_timer_expired() time at about 20ms, which in turn is causing the re-transmit errors.
I've changed the periodic timer to expire at 80ms, which appears to have completely eliminated the retransmit timeout problem. However, the way the code is designed right now I can see the possibility that with very heavy MQTT traffic the uip retransmit timeout problem could reoccur.
So, two outcomes:
The text was updated successfully, but these errors were encountered: