繁体   English   中英

“ python http服务器”由于以下原因自动关闭

[英]“python http server” automatically shut down due to

nohup python -m SimpleHTTPServer 80 &

执行完以上命令后,在Linux vps中创建一个http服务器的http服务器经常会被自动杀死(大约一到两个小时),这是为什么?


Nohup

36.19.96.16 - - [05/Sep/2013 03:20:49] "GET /images/1.jpg HTTP/1.1" 200 - Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
    self.wfile.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
hsb-110-81.hotspotbroadband.com - - [05/Sep/2013 06:39:54] code 400, message Bad HTTP/0.9 request type ('\x80w\x01\x03\x01\x00N\x00\x00\x00')

试试nohup python -m SimpleHTTPServer 80&

并尝试在nohup.out日志中进行调试,这可能会导致某些内存限制而被杀死。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM