-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, using Nevow, I want to send an extra header X-objectId to the client when the client has posted an image to a page. My problem is that when I do a post, the client returns the headers (including mine) but then hangs partly out into the request. Example: curl http://localhost:8000/store/ -F image=@./globalwarming.jpg HTTP/1.1 302 Found Content-length: 391 Content-type: application/xml Accept-ranges: bytes Server: TwistedWeb/8.1.0 Last-modified: Fri, 20 Jun 2008 10:42:22 GMT Location: /info/2008/6/20/f/f95556fd25cc4a8a8cb87b7453bbd0de/f95556fd25cc4a8a8cb87b7453bbd0de.jpg Date: Fri, 20 Jun 2008 10:42:22 GMT X-objectId: 2008/6/20/f/f95556fd25cc4a8a8cb87b7453bbd0de/f95556fd25cc4a8a8cb87b7453bbd0de.jpg <imageMetadata><property name="width" value="934" /><property name="extension" value=".jpg" /><property name="format" value="JPEG" /><property name="colour" value="768" /><property name="height" value="524" /><property name="id" value="2008/6/20/f/f95556fd25cc4a8a8cb87b7453bbd0de/f95556fd25cc4a8a8cb87b7453bbd0de.jpg" /><property name="filename" value="globalwarming.jpg" /> value pairs. """ def __init__(self, config): self.config = config def locateChild(self, ctx, segments): # removed som internal processing here to make the example smaller. self.metadata = {'id': "pokpokpokpo/oijoioij" } # dummy data self.xmlFileName = "/somefile.xml" return self, () def renderHTTP(self, ctx): metadata = self.metadata request = inevow.IRequest(ctx) request.setHeader('Content-Type', 'text/xml; charset=UTF-8') request.setHeader('X-objectId', metadata['id'] ) #request.setResponseCode("303") # 303 request.redirect( "/info/" + metadata['id'] ) #request.finish() # I have also tried to return "" but with the same results. return static.File(self.xmlFileName, 'text/xml') I have tried various ways to get this working. I've tried to call request.finish(), but then the process bombs out. Any tips to what I should do to get this working would be very welcome. Kind regards, Tarjei -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIW4pfYVRKCnSvzfIRArmOAJ9rR94r2taNbFav18FJGPy70iwAvwCfX0v8 FbEX7pBHtvpXJ9qtySEveCc= =L6YP -----END PGP SIGNATURE-----
Hi all being in the early production stage of two http servers implemented with twisted/nevow and making heavy use of athena I observe the following: Either server dies silently after some time ranging from 10 mins to several days with the logs being inconclusive and stopping at random points. Process image size is stable at around 120 MByte, number of concurrent users is around 150, CPU load per core is around 20%. All my testing does not reveal a single problem, everything runs fine until I let 'normal' users hit the server. The underlying OS (OpenBSD) is of no help, not a trace of the process in question can be found, it looks like they vanish into thin air. I am stumped about processes vanishing, no core, no log entries, no nothing. Does somebody out there have a clue on how to debug such a problem. TIA, Werner
participants (2)
-
tarjei
-
Werner Thie