Question

nohup python -m SimpleHTTPServer 80 &

After executing the above command, create a http server http server in linux vps often will automatically be killed(About one to two hours), that is why?


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')
Was it helpful?

Solution

Try nohup python -m SimpleHTTPServer 80 &

and also try to debug in nohup.out logs might be some memory constraint it gets killed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top