Python Problem Solving: IOError: [Errno] Broken pipe

Source: Internet
Author: User


Error One:

Encounter a very strange problem, web.py code inside the error

IOError: [Errno] Broken pipe

Start command:

Nohup python xxx.py >> Xxx.log &

SSH log on to the machine, boot, does not appear

IOError problem occurs when remote SSH executes the startup script


View the process PID, LL/PROC/<PID>/FD found that stderr is the FD 2 file, unexpectedly is a pipe, is a broken pipe, the wrong place to find


Guess is SSH login in the past, Nohup will redirect stderr, default redirect to stdout, but SSH session stdout should be pipe, because the output from the remote machine to upload to the machine

Nohup redirect stderr to this pipe, when the SSH session ends, the pipe will naturally be closed, so when the program code in the stderr inside write things, will be error


Error Two:


In response to the above problems single-machine execution time, found no longer error, but in order to deal with the previous use of Nginx as a reverse proxy, the results appear

IOError: [Errno] Broken pipe


By F12 discovery, post loads a JS file timeout and appears 504 time-out

Check JS file no problem,

Recall, before the use of nginx before, this problem has been resolved, why suddenly appeared,

After data query, using the above nginx configuration to solve

The read time setting should be too short to cause a timeout:

Location/{Proxy_read_timeout 300; ......            .....           }

This kind of problem makes a person egg ache.


This article is from the "Crazy_sir" blog, make sure to keep this source http://douya.blog.51cto.com/6173221/1836848

Python Problem Solving: IOError: [Errno] Broken pipe

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.