Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

HTTP/1.1 503 Service Unavailable when I add pdb.set_trace to Swift source code

I want to debug swift and figure out how the object creates. I know that create object is the HTTP PUT request, so I add import pdb; pdb.set_trace() in the def PUT(self, request): function in the swift/swift/obj/ file. However, when I use Swift RESTful API and other methods to create object, it shows "Service Unavailable" as follows:

HTTP/1.1 503 Service Unavailable
Last-Modified: Thu, 22 Jun 2017 02:40:38 GMT
Content-Length: 118
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx6da701fe62b34e2aaf7da-00594b2e25
X-Openstack-Request-Id: tx6da701fe62b34e2aaf7da-00594b2e25
Date: Thu, 22 Jun 2017 02:40:37 GMT
<h1>Service Unavailable</h1>
<p>The server is currently unavailable. Please try again at a later time.</p>

This PUT function I change is responsible for handling the HTTP PUT requests. When I add other codes like add metadata attributes, it works and without any errors. But why it has "503 Service Unavailable" error if I add pdb.set_trace() in it?

Thanks so much for your kind help! Really appreciate your answers!