502 Error on Rhodecode log and application stuck

Hello the community

We are facing an error something (not to all time) who stuck the application after a moment and we obtain a 502 error on proxy (Apache)

It’s not linked to a specific git/hg operation/repository, it can be appear on browsing web page
I see a similar topic regarding a Apache bug, but we have the Apache version 2.4.62 and the error appear on Rhodecode log

If I analyzed the log i can found these error below

Thanks for your help

2025-06-16 07:51:10.106 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 980] <AuthUser(‘id:None[None] ip:10.42.68.123 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0102s [mercurial/proto-1.0 (Mercurial 4.6.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.106 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 692] <AuthUser(‘id:None[None] ip:10.164.108.12 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0106s [mercurial/proto-1.0 (Mercurial 6.4)], RhodeCode 4.27.1
2025-06-16 07:51:10.118 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 693] <AuthUser(‘id:None[None] ip:10.42.71.75 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0098s [mercurial/proto-1.0 (Mercurial 6.1.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.119 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 981] <AuthUser(‘id:None[None] ip:10.162.35.177 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0103s [mercurial/proto-1.0 (Mercurial 6.4.2)], RhodeCode 4.27.1
2025-06-16 07:51:10.130 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 694] <AuthUser(‘id:None[None] ip:10.75.104.123 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0105s [git/2.36.0.windows.1], RhodeCode 4.27.1
2025-06-16 07:51:10.132 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 982] <AuthUser(‘id:None[None] ip:10.162.35.177 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0117s [mercurial/proto-1.0 (Mercurial 6.4.2)], RhodeCode 4.27.1
2025-06-16 07:51:10.142 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 695] <AuthUser(‘id:None[None] ip:10.42.68.123 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0100s [mercurial/proto-1.0 (Mercurial 4.6.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.150 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 696] <AuthUser(‘id:0[ANONYMOUS] ip:10.164.108.12 auth:False’)> GET Request to /MFS/Products/MG-STAGING time: 0.1550s [mercurial/proto-1.0 (Mercurial 6.4)], RhodeCode 4.27.1
2025-06-16 07:51:10.155 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 983] <AuthUser(‘id:0[ANONYMOUS] ip:10.164.108.12 auth:False’)> GET Request to /MFS/Products/MG-STABLE time: 0.0976s [mercurial/proto-1.0 (Mercurial 6.4)], RhodeCode 4.27.1
2025-06-16 07:51:10.155 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 697] <AuthUser(‘id:0[ANONYMOUS] ip:10.162.36.11 auth:False’)> GET Request to /PSE/RDTOOLS/GQC/GPDPlugin_Setup/info/refs time: 0.1452s [git/2.17.1.windows.2], RhodeCode 4.27.1
2025-06-16 07:51:10.159 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 984] <AuthUser(‘id:0[ANONYMOUS] ip:10.42.71.75 auth:False’)> GET Request to /MFS/Products/MG-STABLE time: 0.1580s [mercurial/proto-1.0 (Mercurial 6.6.3)], RhodeCode 4.27.1
2025-06-16 07:51:10.166 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 698] <AuthUser(‘id:None[None] ip:10.42.70.11 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0100s [mercurial/proto-1.0 (Mercurial 6.1.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.167 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 985] <AuthUser(‘id:None[None] ip:10.36.225.30 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0073s [mercurial/proto-1.0 (Mercurial 7.0.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.178 [3554715] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 699] <AuthUser(‘id:None[None] ip:10.42.70.11 auth:False’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0097s [mercurial/proto-1.0 (Mercurial 6.1.1)], RhodeCode 4.27.1
2025-06-16 07:51:10.212 [3378581] INFO [rhodecode.lib.middleware.request_wrapper] Req[ 986] <AuthUser(‘id:3404[10055048] ip:10.42.70.33 auth:True’)> GET Request to /path/to/.rccontrol/community-1/static/502.html time: 0.0114s [Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0], RhodeCode 4.27.1
2025-06-16 07:51:10 [3378581] [ERROR] Socket error processing request.
Traceback (most recent call last):
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/workers/base_async.py”, line 66, in handle
six.reraise(*sys.exc_info())
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/workers/base_async.py”, line 49, in handle
req = six.next(parser)
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/http/parser.py”, line 41, in next
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/http/message.py”, line 181, in init
super(Request, self).init(cfg, unreader)
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/http/message.py”, line 54, in init
unused = self.parse(self.unreader)
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/http/message.py”, line 230, in parse
self.headers = self.parse_headers(data[:idx])
File “/opt/rhodecode/store/f3cphs7x07gnqgv9iiz6y2chglc63bxk-python2.7-gunicorn-19.9.0/lib/python2.7/site-packages/gunicorn/http/message.py”, line 74, in parse_headers
remote_addr = self.unreader.sock.getpeername()
File “/opt/rhodecode/store/ask5fwcnxkqhi9g6py5hg6a9xbd5xrz2-python2.7-gevent-1.5.0/lib/python2.7/site-packages/gevent/_socket2.py”, line 433, in getpeername
return self._sock.getpeername()
error: [Errno 107] Transport endpoint is not connected

Hi! Unfortunately we cannot make any bugfixes for 4.x version as its deprecated, please try to migrate to 5.x and see if the issue is reproducible. Migration doc is here - Migration to Docker & Rcstack - RhodeCode rcstack 5.27.5 documentation