My server config: Apache/2.2.14 (Ubuntu) DAV/2 SVN/1.6.6 PHP/ 5.3.2-1ubuntu4.10 with Suhosin-Patch mod_wsgi/3.3 Python/2.6.5 configured -- resuming normal operations There is no error at apache log. I've tried to put: try: ...response, content... ...print "NEXT" except Exception as detail: ..print detail None of those prints were used ;/ Seems that I get an infinite loop at response, content... But just saying again, if I try "response, content" without using a thread, it works very nice! And if I try response, content with django webserver it works nice too!
On Feb 11, 11:37 am, Phyllipe <[email protected]> wrote: > I have a python file that works as well, it connects in another > website, doing something like that: > 'response, content = self.http.request('http://www.spoj.pl/', 'POST', > headers=self.headers, body=urlencode(self.bodyLogin))' > It goes inside a class, when I run it in a thread it does not works. > If I try with runserver it works as well! But with Apache2 and > MOD_WSGI doesnt work! > I debugged somethings, I've tried to connect without using the > thread(calling the method in some view) and it worked. > But when I use my SingleTon class that has a bounded semaphores that > creates a thread and in that thread class this method that was talking > before, it stops in the response, content part. > So I did a little more tests, I've created a thread in my views and in > that thread called this method exactly the same way that I called > without threads and that worked, but it has not worked ;/ > I've putted some prints in my code that is how I discovered the line > that has the bug, I've putted a print before call 'response, content' > and a print after, the before print appears but not the last, the > strange thing its that does not raise any kind of exception, cause I > have a try:, except Exception in a while True and it does not executes > the before print again... > some thing like > while True: > ....try: > ........print > ........response.... > ....except Exception as detail: > .......pass > So I'm pretty sure that my bug is something related to Threads + > httplib2, if I use only httplib2 works as well! > If I use only django server works as well if threads and httplib2. > But when I try to deploy in my university server with apache2 and > mod_wsgi it bugs ;/ > At my house with apache2 and mod_wsgi works as well > I have already installed apache2-threaded-dev... -- You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en.

