[Twisted-Python] trac server error
there seems to be some serious problem with http://twistedmatrix.com/trac/ this is what the browser shows me on about one third of the requests: Traceback (most recent call last): File "/srv/trac/.local/lib/python2.4/site-packages/trac/web/api.py", line 382, in send_error 'text/html') File "/srv/trac/.local/lib/python2.4/site-packages/trac/web/chrome.py", line 475, in render_template return stream.render(method, doctype=doctype) File "/srv/trac/.local/lib/python2.4/site-packages/genshi/core.py", line 146, in render output = u''.join(list(generator)) File "/srv/trac/.local/lib/python2.4/site-packages/genshi/output.py", line 200, in __call__ for kind, data, pos in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/output.py", line 486, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File "/srv/trac/.local/lib/python2.4/site-packages/genshi/output.py", line 436, in __call__ for kind, data, pos in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/core.py", line 207, in _ensure for event in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/core.py", line 207, in _ensure for event in stream: File "/srv/trac/.local/lib/python2.4/site-packages/trac/web/chrome.py", line 478, in _strip_accesskeys for kind, data, pos in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/filters.py", line 313, in __call__ for kind, data, pos in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 1145, in _match content = list(content) File "/srv/trac/.local/lib/python2.4/site-packages/genshi/filters.py", line 313, in __call__ for kind, data, pos in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 1120, in _match for event in stream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 1109, in _strip event = stream.next() File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 941, in _eval for event in substream: File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 920, in _eval ctxt): File "/srv/trac/.local/lib/python2.4/site-packages/genshi/template.py", line 930, in _eval result = data.evaluate(ctxt) File "/srv/trac/.local/lib/python2.4/site-packages/genshi/eval.py", line 101, in evaluate {'data': data}) File "/home/trac/.local/share/trac/templates/error.html", line 36, in File "/srv/trac/.local/lib/python2.4/site-packages/trac/util/__init__.py", line 50, in get_reporter_id name = req.session.get('name', None) AttributeError: 'NoneType' object has no attribute 'get' ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] RE: Question about Descriptors and SelectReactor
Hi Alec and Drew: Thanks for answering my question. From reading an excerpt of Steven's "UNIX Network Programming," it implies that the FD_SETSIZE is defined in the kernel. If you want a bigger FD_SETSIZE, you need to recompile the kernel. At least that is the case in BSD 4.4 UNIX. However I am using Linux. The Twisted documentation is recommending that it may be better to use pollreactor. Cheers, Andrew --- On Tue, 4/7/09, twisted-python-requ...@twistedmatrix.com wrote: > From: twisted-python-requ...@twistedmatrix.com > > Subject: Twisted-Python Digest, Vol 61, Issue 10 > To: twisted-python@twistedmatrix.com > Date: Tuesday, April 7, 2009, 9:00 AM > Send Twisted-Python mailing list > submissions to > twisted-python@twistedmatrix.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > or, via email, send a message with subject or body 'help' > to > twisted-python-requ...@twistedmatrix.com > > You can reach the person managing the list at > twisted-python-ow...@twistedmatrix.com > > When replying, please edit your Subject line so it is more > specific > than "Re: Contents of Twisted-Python digest..." > > > Today's Topics: > >1. RE: Question about Descriptors and > SelectReactor (Alec Matusis) >2. trac server error (Johann Borck) > > > -- > > Message: 1 > Date: Mon, 6 Apr 2009 18:25:45 -0700 > From: "Alec Matusis" > Subject: RE: [Twisted-Python] Question about Descriptors > and > SelectReactor > To: "'Twisted general discussion'" > Message-ID: <009701c9b71f$ca82aac0$5f8800...@com> > Content-Type: text/plain; > charset="utf-8" > > > I would say a function of the operating system - or > specifically > > ulimit on a *nix system. > > I do not think this is correct, on linux: ulimit -n is the > number of fds that can be written/read by a process, but the > 1024 limit on select is actually hard-compiled into the > kernel and can be changed only in the headers with kernel > recompilation. > > > -Original Message- > > From: twisted-python-boun...@twistedmatrix.com > [mailto:twisted-python- > > boun...@twistedmatrix.com] > On Behalf Of Drew Smathers > > Sent: Monday, April 06, 2009 8:40 AM > > To: Twisted general discussion > > Subject: Re: [Twisted-Python] Question about > Descriptors and > > SelectReactor > > > > On Sat, Apr 4, 2009 at 6:04 PM, Andrew Francis > > wrote: > > > > > > Hi: > > > > > > Perhaps this question has been asked before but > is there a limit to > > the number of descriptors the SelectReactor can > handle? Is this a > > function of the operating system? > > > > > > > I would say a function of the operating system - or > specifically > > ulimit on a *nix system. > > > > -Drew > > > > ___ > > Twisted-Python mailing list > > Twisted-Python@twistedmatrix.com > > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Can't quit a Tkinter application on MacOS X when using Twisted; fix? workaround?
I am trying to convert a cross-platform Python/Tkinter application to use Twisted and have run into a problem: at least on MacOS X I can no longer quit the application. I have appended a minimal script showing the problem. This is probably not an issue on unix and WIndows because I find I have to add my own Quit menu item anyway, so I can make it do what I like. But on MacOS X with Aqua Tcl/Tk that item is added by the system and its meaning appears to be hard-wired -- I suspect to it calls "quit" on Tk's mainloop, but I don't know. Any suggestion for a workaround would be most appreciated. Also if this is not a known issue I will file a bug report. -- Russell """Script showing failure-to-quit bug At least on MacOS XO 10.5.6 with twisted 8.2.0, python 2.5.2 (from python.org) and Aqua Tck/Tk 8.4.19 the File>Quit menu has no effect and typing ctrl-Q causes the menu to briefly highlight (as usual) but has no other effect. "" import Tkinter import twisted.internet.tksupport root = Tkinter.Tk() twisted.internet.tksupport.install(root) reactor = twisted.internet.reactor reactor.run() ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
RE: [Twisted-Python] RE: Question about Descriptors and SelectReactor
> However I am using Linux. The Twisted documentation is recommending > that it may be better to use pollreactor I would be actually quite curious to know the rationale of choosing select() over epoll() these days. epoll() scales like O(1) with the number of file descriptors, it is very performant, stable, and has no limitation on the overall number of fds on linux (except for your /proc and ulimit -n settings). I'd use epoll reactor, unless you have some very specialized requirement. > -Original Message- > From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python- > boun...@twistedmatrix.com] On Behalf Of Andrew Francis > Sent: Tuesday, April 07, 2009 10:13 AM > To: twisted-python@twistedmatrix.com > Subject: [Twisted-Python] RE: Question about Descriptors and > SelectReactor > > > Hi Alec and Drew: > > Thanks for answering my question. From reading an excerpt of Steven's > "UNIX Network Programming," it implies that the FD_SETSIZE is defined > in the kernel. If you want a bigger FD_SETSIZE, you need to recompile > the kernel. At least that is the case in BSD 4.4 UNIX. > > However I am using Linux. The Twisted documentation is recommending > that it may be better to use pollreactor. > > Cheers, > Andrew > > --- On Tue, 4/7/09, twisted-python-requ...@twistedmatrix.com python-requ...@twistedmatrix.com> wrote: > > > From: twisted-python-requ...@twistedmatrix.com requ...@twistedmatrix.com> > > Subject: Twisted-Python Digest, Vol 61, Issue 10 > > To: twisted-python@twistedmatrix.com > > Date: Tuesday, April 7, 2009, 9:00 AM > > Send Twisted-Python mailing list > > submissions to > > twisted-python@twistedmatrix.com > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > or, via email, send a message with subject or body 'help' > > to > > twisted-python-requ...@twistedmatrix.com > > > > You can reach the person managing the list at > > twisted-python-ow...@twistedmatrix.com > > > > When replying, please edit your Subject line so it is more > > specific > > than "Re: Contents of Twisted-Python digest..." > > > > > > Today's Topics: > > > >1. RE: Question about Descriptors and > > SelectReactor (Alec Matusis) > >2. trac server error (Johann Borck) > > > > > > - > - > > > > Message: 1 > > Date: Mon, 6 Apr 2009 18:25:45 -0700 > > From: "Alec Matusis" > > Subject: RE: [Twisted-Python] Question about Descriptors > > and > > SelectReactor > > To: "'Twisted general discussion'" > > Message-ID: <009701c9b71f$ca82aac0$5f8800...@com> > > Content-Type: text/plain; > > charset="utf-8" > > > > > I would say a function of the operating system - or > > specifically > > > ulimit on a *nix system. > > > > I do not think this is correct, on linux: ulimit -n is the > > number of fds that can be written/read by a process, but the > > 1024 limit on select is actually hard-compiled into the > > kernel and can be changed only in the headers with kernel > > recompilation. > > > > > -Original Message- > > > From: twisted-python-boun...@twistedmatrix.com > > [mailto:twisted-python- > > > boun...@twistedmatrix.com] > > On Behalf Of Drew Smathers > > > Sent: Monday, April 06, 2009 8:40 AM > > > To: Twisted general discussion > > > Subject: Re: [Twisted-Python] Question about > > Descriptors and > > > SelectReactor > > > > > > On Sat, Apr 4, 2009 at 6:04 PM, Andrew Francis > > > > wrote: > > > > > > > > Hi: > > > > > > > > Perhaps this question has been asked before but > > is there a limit to > > > the number of descriptors the SelectReactor can > > handle? Is this a > > > function of the operating system? > > > > > > > > > > I would say a function of the operating system - or > > specifically > > > ulimit on a *nix system. > > > > > > -Drew > > > > > > ___ > > > Twisted-Python mailing list > > > Twisted-Python@twistedmatrix.com > > > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > > > > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
RE: [Twisted-Python] RE: Question about Descriptors and SelectReactor
On 7 Apr, 06:17 pm, matu...@yahoo.com wrote: However I am using Linux. The Twisted documentation is recommending that it may be better to use pollreactor I would be actually quite curious to know the rationale of choosing select() over epoll() these days. epoll() scales like O(1) with the number of file descriptors, it is very performant, stable, and has no limitation on the overall number of fds on linux (except for your /proc and ulimit -n settings). I'd use epoll reactor, unless you have some very specialized requirement. Short answer: because select() is always available. Longer answer: Looks like maybe you want to contribute a patch for this ticket :) http://twistedmatrix.com/trac/ticket/2234 ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python