What is the permanent solution of broken pipe error?

I am fed up now with this error it occurs automatically after sometimes whenever some exceptions occur. the only solution as of now that works is restarting the server again but this couldn’t be the solution for the production environment. How to tackle this issue.

Please check the reference:

What causes this particular issue? I can see a lot of people face this issue.

Hi this is not working in my case
I again got this broken pipe error even after executing these commands