• Portada
    • Recientes
    • Usuarios
    • Registrarse
    • Conectarse

    Apache proxy problem

    Programado Fijo Cerrado Movido Software
    4 Mensajes 3 Posters 1.1k Visitas 2 Watching
    Cargando más mensajes
    • Más antiguo a más nuevo
    • Más nuevo a más antiguo
    • Mayor número de Votos
    Responder
    • Responder como tema
    Accede para responder
    Este tema ha sido borrado. Solo los usuarios que tengan privilegios de administración de temas pueden verlo.
    • cobitoC Desconectado
      cobito Administrador
      Última edición por cobito

      Hello,

      This week I received a notice from three users in the video section saying they can't upload videos. After doing some tests, I checked that if the video upload time is over 60 seconds, a connection error occurs between Apache and Peertube (NodeJS). The error is as follows:

      [proxy:error] [pid xxx] (32)Broken pipe: [client xxx.xxx.xxx.xxx:59835] AH01084: pass request body failed to 127.0.0.1:9001 (127.0.0.1), referer: https://video.hardlimit.com/videos/upload 

      and then this one:

      [proxy_http:error] [pid xxx] [client xxx.xxx.xxx.xxx:59835] AH01097: pass request body failed to 127.0.0.1:9001 (127.0.0.1) from xxx.xxx.xxx.xxx (), referer: https://video.hardlimit.com/videos/upload 

      Regarding the first error, sometimes this one appears and sometimes this other one:

      [proxy:error] [pid xxx] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:58520] AH01084: pass request body failed to 127.0.0.1:9000 (127.0.0.1), referer: https://video.hardlimit.com/videos/upload 

      The appearance of one or the other is random.

      This looks like it's happening because of a timeout, so I added this to the Apache configuration:

      Timeout 900 ProxyTimeout 900 KeepAliveTimeout 600 

      But it doesn't solve anything. In the virtualhost configuration, I added timeouts to the proxy like this:

      ProxyPass /           http://127.0.0.1:9000/ timeout=600 ProxyPassReverse / http://127.0.0.1:9000/ timeout=600 

      But nothing. Finally, I changed the kernel configuration parameter "/proc/sys/net/ipv4/tcp_fin_timeout" which coincidentally had a value of 60, but changing it to 120 didn't make any difference.

      Looking at the logs, apparently this has been happening forever, but coincidentally, the vast majority of videos uploaded so far didn't exceed that upload time. I'm also not 100% sure that timeout used to be higher and that some update changed it. The truth is that it's too much of a coincidence that exactly 3 people complain the same week about the same thing, but anyway.

      The Peertube people don't support Apache, so as a last desperate resort, I'll have to try with Nginx (something I honestly don't feel like doing at all). Before getting to that, if there's anyone here who is knowledgeable about Apache matters who can shed some light on this, I would greatly appreciate it.

      Toda la actualidad en la portada de Hardlimit
      Mis cacharros

      hlbm signature

      1 Respuesta Última respuesta Responder Citar 2
      • cobitoC Desconectado
        cobito Administrador
        Última edición por

        Well, something has definitely changed in the last week. One of the affected users had uploaded videos in the past that took around half an hour to transfer. Looking at the APT logs (something I should have done before to stop suspecting Apache) I see that last Sunday I updated NodeJS, so it seems the perfect candidate for messing things up.

        To fix it, in the end I installed Nginx, so from now on, all Hardlimit pages go through that web server. With this, the problem has been solved.

        The reason I think it's solved is that when using Apache, when uploading a video, it was being copied as it was being received into the Peertube temporary folder. With Nginx, the file first goes into a server buffer and when it has finished being received, it is transferred to the Peertube temporary folder. That's why with Nginx there are no timeouts; because the internal transfer time is much shorter than the external one.

        So with all this, I am 99% sure that it was the damn NodeJS update, where for some reason, they introduced a 60-second timeout for connections out of nowhere. And this is actually a bug, because in addition to annoying us the rebels who had preferred to avoid Nginx until now, the internal speed is also limited and in the end, the maximum file size will be the one that gives time to transfer in those 60 seconds.

        Toda la actualidad en la portada de Hardlimit
        Mis cacharros

        hlbm signature

        1 Respuesta Última respuesta Responder Citar 1
        • FassouF Desconectado
          Fassou MODERADOR
          Última edición por

          You solve the problem, you uncover the mystery and on top of that you get involved in another project. What a guy ? You end up seeing yourself learning Russian ? Cheers! / Ура

          Intel i5 3570k / ASRock Z77 Extreme 4 / G.Skill F3-12800CL9D-8GBRL / Sapphire HD5850 / Samsung HD103UJ / TR TrueSpirit / NZXT Source 210 / OCZ ZS550W
          Intel i5 4570 / ASRock H87 Pro 4 / 2x G.Skill F3-14900CL8-4GBXM / Samsung 850 EVO 250Gb + ST1000DM003 + ST2000DM003 + HGST HDS723020BLA642 + Maxtor 6V250F0 / CM Seidon 240M / Zalman MS800 / CM MWE 550
          AMD Ryzen 7 1800X / B350 / 2x8GB Samsung DDR4-2400 CL17 / NVIDIA GTX 1070 8GB / SSD 120GB + ST4000DM004 + ST6000DM003 / EVGA Supernova 650 G2

          hlbm signature

          1 Respuesta Última respuesta Responder Citar 2
          • YorusY Desconectado
            Yorus Veteranos HL
            Última edición por

            For me Apache is always a mystery, when I have messed with it, and it's been a while, I never know how it has managed to work ?

            Mi centro de operaciones
            Mi blog en HL

            hlbm signature

            1 Respuesta Última respuesta Responder Citar 2
            • 1 / 1
            • First post
              Last post

            Foreros conectados [Conectados hoy]

            0 usuarios activos (0 miembros y 0 invitados).
            febesin, pAtO,

            Estadísticas de Hardlimit

            Los hardlimitianos han creado un total de 543.5k posts en 62.9k hilos.
            Somos un total de 34.9k miembros registrados.
            roymendez ha sido nuestro último fichaje.
            El récord de usuarios en linea fue de 123 y se produjo el Thu Jan 15 2026.