1

I have infrastructure with few app services on azure and some of them started to fail a few day ago returning error 502 "The specified CGI application encountered an error and the server terminated the process". Error start afters tens of calls and only app restart temporary fix a problem. I tried almost everything including this and this but nothing helped. I run out of ideas.

regards

cargt4
  • 37
  • 4
  • Have you solved the problem. I'm facing the same 502 response status, thinking about to scale up plan. I now have B1 plan – FVBn Sep 03 '20 at 01:01
  • @FVBn We have wrong implementation of HTTP Client disposing it each time. We had many call to external system using rest api and not reusing HTTP Client was exhausting port pool. Changing plan didnt help anything. – cargt4 Sep 03 '20 at 10:29
  • Did it have high CPU usages? – FVBn Sep 04 '20 at 06:01
  • No. We couldnt find anything wrong in logs, stats (CPU, Memory consumption). App service just stop working after some time. As far as i remember 502 can mean many thinks. – cargt4 Sep 04 '20 at 13:00

1 Answers1

0

You should check in Azure your performance. We had the same error, the solution for you is either upgrade your server plan or check what your service actually does on API call and how much does it cost CPU. Most of the time you get this error when some exception occurs. As well try to check if you are using correct method (POST/GET) on the calling API endpoint

Andrius
  • 344
  • 4
  • 16
  • I have s1 plan so it shouldnt be problem for that amount of calls. I checked app insights and there are no errors logged. – cargt4 Oct 10 '19 at 18:02
  • If you have 'pay as you go' plan I suggest temporarily switch to S2 and check if it's still happening. Please go to kudu console as well and monitor your CPU/memory usage meanwhile calling this API endpoint – Andrius Oct 10 '19 at 18:18