Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris McDonough wrote: > simahawk wrote: >> Hi, >> indeed I tried to use twisted and finally it worked! >> >> I simply installed PasteScript and Twisted and changed a line in the >> server section of the myproj.ini: >> >> [server:main] >> use = egg:PasteScript#twisted > > That's a bit of a shame... the paste HTTP server is usually the best > behaved of the bunch. > > - C > We had a similar problem in zopeproject and Grok when switching to paster based project layouts. The problem is described here https://bugs.launchpad.net/zope3/+bug/332063 The solution was to change zope.publisher again to support that special paste.httpserver related issue. http://svn.zope.org/zope.publisher/branches/3.4/?rev=101291&view=rev Hth, Michael - -- http://blog.d2m.at http://planetzope.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKqeUQl0uAvQJUKVYRApNXAJ4zVyhfWjA1yL0NaDiXhZTvP+bL+gCdGmbm A4IFZ/q+0ZOpuSzOR6Aahk8= =4aQ5 -END PGP SIGNATURE- ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
I actually use xmlrpc a lot and have run into this in the past a few times. there have been a few incarnations of medusa in the past that has also exhibited similiar symptoms, I think it has something to do with how the server and client decide if there is anything left to transfer over the socket and the client sits waiting for something never coming and blocking a thread on the server. Unfortunately when I have encountered this in the past (like now) I am always buried under the current project workload and just can't spend the time trying to pin down the specifics. T On Fri, Sep 11, 2009 at 4:10 AM, Chris McDonough wrote: > simahawk wrote: >> >> Hi, >> indeed I tried to use twisted and finally it worked! >> >> I simply installed PasteScript and Twisted and changed a line in the >> server section of the myproj.ini: >> >> [server:main] >> use = egg:PasteScript#twisted > > That's a bit of a shame... the paste HTTP server is usually the best behaved > of the bunch. > > - C > > >> >> >> >> On Thu, 2009-09-10 at 12:51 -0400, Chris McDonough wrote: >>> >>> The output of the threads debug middleware you put up at >>> http://pastebin.org/16704 looks more or less normal to me. You might try a >>> different WSGI HTTP server to see if that has any effect. >>> >>> - C >>> >>> simahawk wrote: Thank you Tim! It seems the only thing I can do is try to use twisted. Am I wrong? BTW I tried repoze.debug and this is the result: http://pastebin.org/16704 10 threads waiting for something... On Thu, 2009-09-10 at 09:02 +0800, Tim Hoffman wrote: > > I found that if you run zope3 server under paste you get the same > thing, whereas if you use twisted > it works fine. See this thread I posted last year. > > https://mail.zope.org/pipermail/zope3-users/2008-October/008261.html > > T > > On Wed, Sep 9, 2009 at 11:32 PM, simahawk wrote: >> >> hi list, >> >> I created a web-service with repoze.bfg and repoze.bfg.xmlrpc with a >> xmlrpx_view. This views creates a PDF and it should return me a simple >> string with the url of the PDF but in order to get my string back I >> need >> to restart repoze 'cause the application hangs at some point after the >> view returns the string. >> >> I went trough the code with pdb and I found that the application hangs >> on the method "worker_thread_callback" in >> Paste-1.7.2-py2.6.egg/paste/httpserver.py >> >> I tried to make the view returning the string directly and it works... >> so it seems it doesn't like processing stuff in the meanwhile... :) >> >> In other word, this works: >> >> [...] >> @xmlrpc_view >> def generate_report(context, data): >> url = 'http://foo.com/static/file.pdf' >> return url >> [...] >> >> whilst this don't: >> >> [...] >> @xmlrpc_view >> def generate_report(context, data): >> do_this >> [...] >> do_that >> url = 'http://foo.com/static/file.pdf' >> return url >> [...] >> >> It's a bit weird... any suggestion will be much appreciated. >> >> Thanks, >> SimO >> >> ___ >> Repoze-dev mailing list >> Repoze-dev@lists.repoze.org >> http://lists.repoze.org/listinfo/repoze-dev >> > ___ > Repoze-dev mailing list > Repoze-dev@lists.repoze.org > http://lists.repoze.org/listinfo/repoze-dev ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev >> > > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
simahawk wrote: > Hi, > indeed I tried to use twisted and finally it worked! > > I simply installed PasteScript and Twisted and changed a line in the > server section of the myproj.ini: > > [server:main] > use = egg:PasteScript#twisted That's a bit of a shame... the paste HTTP server is usually the best behaved of the bunch. - C > > > > On Thu, 2009-09-10 at 12:51 -0400, Chris McDonough wrote: >> The output of the threads debug middleware you put up at >> http://pastebin.org/16704 looks more or less normal to me. You might >> try a different WSGI HTTP server to see if that has any effect. >> >> - C >> >> simahawk wrote: >>> Thank you Tim! >>> >>> It seems the only thing I can do is try to use twisted. Am I wrong? >>> >>> BTW I tried repoze.debug and this is the result: >>> http://pastebin.org/16704 >>> >>> 10 threads waiting for something... >>> >>> >>> On Thu, 2009-09-10 at 09:02 +0800, Tim Hoffman wrote: I found that if you run zope3 server under paste you get the same thing, whereas if you use twisted it works fine. See this thread I posted last year. https://mail.zope.org/pipermail/zope3-users/2008-October/008261.html T On Wed, Sep 9, 2009 at 11:32 PM, simahawk wrote: > hi list, > > I created a web-service with repoze.bfg and repoze.bfg.xmlrpc with a > xmlrpx_view. This views creates a PDF and it should return me a simple > string with the url of the PDF but in order to get my string back I need > to restart repoze 'cause the application hangs at some point after the > view returns the string. > > I went trough the code with pdb and I found that the application hangs > on the method "worker_thread_callback" in > Paste-1.7.2-py2.6.egg/paste/httpserver.py > > I tried to make the view returning the string directly and it works... > so it seems it doesn't like processing stuff in the meanwhile... :) > > In other word, this works: > > [...] > @xmlrpc_view > def generate_report(context, data): >url = 'http://foo.com/static/file.pdf' >return url > [...] > > whilst this don't: > > [...] > @xmlrpc_view > def generate_report(context, data): >do_this >[...] >do_that >url = 'http://foo.com/static/file.pdf' >return url > [...] > > It's a bit weird... any suggestion will be much appreciated. > > Thanks, > SimO > > ___ > Repoze-dev mailing list > Repoze-dev@lists.repoze.org > http://lists.repoze.org/listinfo/repoze-dev > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev >>> ___ >>> Repoze-dev mailing list >>> Repoze-dev@lists.repoze.org >>> http://lists.repoze.org/listinfo/repoze-dev >>> > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
Hi, indeed I tried to use twisted and finally it worked! I simply installed PasteScript and Twisted and changed a line in the server section of the myproj.ini: [server:main] use = egg:PasteScript#twisted On Thu, 2009-09-10 at 12:51 -0400, Chris McDonough wrote: > The output of the threads debug middleware you put up at > http://pastebin.org/16704 looks more or less normal to me. You might > try a different WSGI HTTP server to see if that has any effect. > > - C > > simahawk wrote: > > Thank you Tim! > > > > It seems the only thing I can do is try to use twisted. Am I wrong? > > > > BTW I tried repoze.debug and this is the result: > > http://pastebin.org/16704 > > > > 10 threads waiting for something... > > > > > > On Thu, 2009-09-10 at 09:02 +0800, Tim Hoffman wrote: > >> I found that if you run zope3 server under paste you get the same > >> thing, whereas if you use twisted > >> it works fine. See this thread I posted last year. > >> > >> https://mail.zope.org/pipermail/zope3-users/2008-October/008261.html > >> > >> T > >> > >> On Wed, Sep 9, 2009 at 11:32 PM, simahawk wrote: > >>> hi list, > >>> > >>> I created a web-service with repoze.bfg and repoze.bfg.xmlrpc with a > >>> xmlrpx_view. This views creates a PDF and it should return me a simple > >>> string with the url of the PDF but in order to get my string back I need > >>> to restart repoze 'cause the application hangs at some point after the > >>> view returns the string. > >>> > >>> I went trough the code with pdb and I found that the application hangs > >>> on the method "worker_thread_callback" in > >>> Paste-1.7.2-py2.6.egg/paste/httpserver.py > >>> > >>> I tried to make the view returning the string directly and it works... > >>> so it seems it doesn't like processing stuff in the meanwhile... :) > >>> > >>> In other word, this works: > >>> > >>> [...] > >>> @xmlrpc_view > >>> def generate_report(context, data): > >>>url = 'http://foo.com/static/file.pdf' > >>>return url > >>> [...] > >>> > >>> whilst this don't: > >>> > >>> [...] > >>> @xmlrpc_view > >>> def generate_report(context, data): > >>>do_this > >>>[...] > >>>do_that > >>>url = 'http://foo.com/static/file.pdf' > >>>return url > >>> [...] > >>> > >>> It's a bit weird... any suggestion will be much appreciated. > >>> > >>> Thanks, > >>> SimO > >>> > >>> ___ > >>> Repoze-dev mailing list > >>> Repoze-dev@lists.repoze.org > >>> http://lists.repoze.org/listinfo/repoze-dev > >>> > >> ___ > >> Repoze-dev mailing list > >> Repoze-dev@lists.repoze.org > >> http://lists.repoze.org/listinfo/repoze-dev > > > > ___ > > Repoze-dev mailing list > > Repoze-dev@lists.repoze.org > > http://lists.repoze.org/listinfo/repoze-dev > > > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
The output of the threads debug middleware you put up at http://pastebin.org/16704 looks more or less normal to me. You might try a different WSGI HTTP server to see if that has any effect. - C simahawk wrote: > Thank you Tim! > > It seems the only thing I can do is try to use twisted. Am I wrong? > > BTW I tried repoze.debug and this is the result: > http://pastebin.org/16704 > > 10 threads waiting for something... > > > On Thu, 2009-09-10 at 09:02 +0800, Tim Hoffman wrote: >> I found that if you run zope3 server under paste you get the same >> thing, whereas if you use twisted >> it works fine. See this thread I posted last year. >> >> https://mail.zope.org/pipermail/zope3-users/2008-October/008261.html >> >> T >> >> On Wed, Sep 9, 2009 at 11:32 PM, simahawk wrote: >>> hi list, >>> >>> I created a web-service with repoze.bfg and repoze.bfg.xmlrpc with a >>> xmlrpx_view. This views creates a PDF and it should return me a simple >>> string with the url of the PDF but in order to get my string back I need >>> to restart repoze 'cause the application hangs at some point after the >>> view returns the string. >>> >>> I went trough the code with pdb and I found that the application hangs >>> on the method "worker_thread_callback" in >>> Paste-1.7.2-py2.6.egg/paste/httpserver.py >>> >>> I tried to make the view returning the string directly and it works... >>> so it seems it doesn't like processing stuff in the meanwhile... :) >>> >>> In other word, this works: >>> >>> [...] >>> @xmlrpc_view >>> def generate_report(context, data): >>>url = 'http://foo.com/static/file.pdf' >>>return url >>> [...] >>> >>> whilst this don't: >>> >>> [...] >>> @xmlrpc_view >>> def generate_report(context, data): >>>do_this >>>[...] >>>do_that >>>url = 'http://foo.com/static/file.pdf' >>>return url >>> [...] >>> >>> It's a bit weird... any suggestion will be much appreciated. >>> >>> Thanks, >>> SimO >>> >>> ___ >>> Repoze-dev mailing list >>> Repoze-dev@lists.repoze.org >>> http://lists.repoze.org/listinfo/repoze-dev >>> >> ___ >> Repoze-dev mailing list >> Repoze-dev@lists.repoze.org >> http://lists.repoze.org/listinfo/repoze-dev > > ___ > Repoze-dev mailing list > Repoze-dev@lists.repoze.org > http://lists.repoze.org/listinfo/repoze-dev > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Fwd: repoze.bfg.xmlrpc - httpserver hangs
Thank you Tim! It seems the only thing I can do is try to use twisted. Am I wrong? BTW I tried repoze.debug and this is the result: http://pastebin.org/16704 10 threads waiting for something... On Thu, 2009-09-10 at 09:02 +0800, Tim Hoffman wrote: > I found that if you run zope3 server under paste you get the same > thing, whereas if you use twisted > it works fine. See this thread I posted last year. > > https://mail.zope.org/pipermail/zope3-users/2008-October/008261.html > > T > > On Wed, Sep 9, 2009 at 11:32 PM, simahawk wrote: > > hi list, > > > > I created a web-service with repoze.bfg and repoze.bfg.xmlrpc with a > > xmlrpx_view. This views creates a PDF and it should return me a simple > > string with the url of the PDF but in order to get my string back I need > > to restart repoze 'cause the application hangs at some point after the > > view returns the string. > > > > I went trough the code with pdb and I found that the application hangs > > on the method "worker_thread_callback" in > > Paste-1.7.2-py2.6.egg/paste/httpserver.py > > > > I tried to make the view returning the string directly and it works... > > so it seems it doesn't like processing stuff in the meanwhile... :) > > > > In other word, this works: > > > > [...] > > @xmlrpc_view > > def generate_report(context, data): > >url = 'http://foo.com/static/file.pdf' > >return url > > [...] > > > > whilst this don't: > > > > [...] > > @xmlrpc_view > > def generate_report(context, data): > >do_this > >[...] > >do_that > >url = 'http://foo.com/static/file.pdf' > >return url > > [...] > > > > It's a bit weird... any suggestion will be much appreciated. > > > > Thanks, > > SimO > > > > ___ > > Repoze-dev mailing list > > Repoze-dev@lists.repoze.org > > http://lists.repoze.org/listinfo/repoze-dev > > > ___ > Repoze-dev mailing list > Repoze-dev@lists.repoze.org > http://lists.repoze.org/listinfo/repoze-dev ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev