I have nginx and uwsgi installed on a CentOS 6 server. When I send some data to a web server, it is processed correctly, but the result is not returned. If I print the generated html just before the application before the application function returns it, the HTML will display correctly in the console, but the following line in the console:
[pid: 31650|app: 0|req: 2/2] <server ip> () {48 vars in 873 bytes} [Mon Sep 15 18:19:45 2014] POST / => generated 0 bytes in 10583 msecs (HTTP/1.1 200) 1 headers in 44 bytes (418 switches on core 0)
I increased the socket timeout but it doesn’t matter.
EDIT: I applied a weird workaround for this. My html was stored in the "html" variable. I changed my code:
return [html]
To:
open('/tmp/ot.txt', 'w').write(html)
d = open('/tmp/ot.txt').read()
return [d]
I would prefer not to use my workaround. Any ideas why this works, but the original is not. Python version - 2.6.6
Ravi source
share