On 21 June 2011 23:54, Nick K <[email protected]> wrote: > Hi, all, > I hope this is the right forum (I am very new at this). > I've been trying to get Django to work as a Paypal IPN endpoint, and I've > been using wsgi. Basically, Paypal contacts my server with information using > a seemingly headerless request. > Here is the entry in the access log: > 216.113.191.33 - - [21/Jun/2011:11:42:03 -0400] "POST /ipn_endpoint_test > HTTP/1.0" 500 36936 "-" "-" > > and here is the error: > [Tue Jun 21 11:42:03 2011] [error] [client 216.113.191.33] mod_wsgi > (pid=11130): Exception occurred processing WSGI script > '/var/www/wsgi/wsgi.wsgi'. > [Tue Jun 21 11:42:03 2011] [error] [client 216.113.191.33] IOError: failed > to write data
For daemon mode, to get this specific message means that after your WSGI application has returned a response and while the response content is being written back from daemon process to Apache child, the connection between Apache child process and daemon process has been closed. Since this is after the WSGI application had returned a response, including headers, then for 500 to appear in the access log would sort of imply the WSGI application had returned a 500 response to begin with, unless Apache child had something rather severe happen. If the latter happened would expect to see some sort of message in the error log. Make sure you are looking at the main Apache error log and not just the virtual host log. To try and work out what the request and response are, suggest using a variation of: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Request_and_Response to capture incoming request and the response. If this is a site servicing a lot of other traffic, modify the wrapper to check PATH_INFO and only do stuff if request is for that particular URL. Seeing exactly what is received and returned may help to understand it. BTW, is PayPal connecting on a SSL connection? Graham > What mystifies me is that the script runs perfectly in the browser. The > first line of the script being called is a logging entry, and it doesn't > even reach that point when PayPal calls it. I also (think) I have Paste's > error middleware running, and that's also not registering anything. > (1) Anyone know what could be causing this? > (2) Anyone want to help a poor n00b figure out the best way to debug this? > Thanks so much, > Nick > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/modwsgi/-/VNgedkT2zvcJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
