Re: [Twisted-Python] any progress for Ticket #6346, #6378?

2013-05-28 Thread Alec Matusis
...@twistedmatrix.com] On Behalf Of Gelin Yan Sent: Tuesday, May 28, 2013 9:09 PM To: Twisted general discussion Subject: Re: [Twisted-Python] any progress for Ticket #6346, #6378? On Wed, May 29, 2013 at 10:37 AM, Alec Matusis wrote: Hi Gelin, > As I know there are two epoll implementations in twis

Re: [Twisted-Python] any progress for Ticket #6346, #6378?

2013-05-28 Thread Alec Matusis
ted 10.1 as I wrote). How can I check whether twisted is using Python’s epoll or its own in this combination? And how can I switch between epoll implementations in my app? Alec From: Gelin Yan [mailto:dynami...@gmail.com] Sent: Tuesday, May 28, 2013 6:42 PM To: Alec Matusis Subject: Re: [Twis

Re: [Twisted-Python] any progress for Ticket #6346, #6378?

2013-05-28 Thread Alec Matusis
>   By reading these comments, It looks like recent version of twisted >may >suffer from this problem. So what version of twisted should  I use? Do >I >need to keep using 10.1? This problem is very frequent on Linux with Python 2.7 / Twisted 12 combination (we had to quickly roll back- cannot oper

Re: [Twisted-Python] Epoll error after upgrading from 10.0 to 12.3

2013-03-03 Thread Alec Matusis
> If you don't find a ticket for the bug, you should report it. Please be sure to include enough information to reproduce the issue if you file a new ticket (or as much information as you have, at least). > Jean-Paul I filed http://twistedmatrix.com/trac/ticket/6346 It's hard to do any detailed

[Twisted-Python] Epoll error after upgrading from 10.0 to 12.3

2013-03-02 Thread Alec Matusis
I had 60 busy tcp servers that ran on Python 2.6/Twisted 10.0 (or Twisted 9.0) for over two years with not problems. After I upgraded to Twisted 12.3/Python 2.7, I started getting the errors below (no application code changes). It took about two days for the first error to appear on a busy server u

Re: [Twisted-Python] debugging a memory leak

2010-03-03 Thread Alec Matusis
com] On Behalf Of exar...@twistedmatrix.com > Sent: Thursday, February 25, 2010 4:51 PM > To: Twisted general discussion > Subject: Re: [Twisted-Python] debugging a memory leak > > On 01:24 am, johann.bo...@densedata.com wrote: > >Alec Matusis wrote: > >>In desperation of not findi

Re: [Twisted-Python] debugging a memory leak

2010-02-24 Thread Alec Matusis
until proven otherwise. > > Not to bother you with numbers but I usually allocate about 30% of > overall project time to bring a server into a production ready state, > meaning uptimes of months/years, no fishy feelings, no performance > oscillations, predictable caving and recupe

Re: [Twisted-Python] debugging a memory leak

2010-02-22 Thread Alec Matusis
Message- > From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python- > boun...@twistedmatrix.com] On Behalf Of Maarten ter Huurne > Sent: Monday, February 22, 2010 6:24 PM > To: Twisted general discussion > Subject: Re: [Twisted-Python] debugging a memory leak > > On T

Re: [Twisted-Python] debugging a memory leak

2010-02-22 Thread Alec Matusis
gt;names.sort() >for name in names: > if limit == 0 or objects[name] > limit: >if not prev.has_key(name): > prev[name] = objects[name] >dt = objects[name] - prev[name] >if delta or dt != 0: > print '%0.6d -- %0.6d

Re: [Twisted-Python] debugging a memory leak

2010-02-19 Thread Alec Matusis
pk = prev.keys() >pk.sort() >names = objects.keys() >names.sort() >for name in names: > if limit == 0 or objects[name] > limit: >if not prev.has_key(name): > prev[name] = objects[name] >dt = objects[name] - prev[name] >

[Twisted-Python] debugging a memory leak

2010-02-19 Thread Alec Matusis
I modified a tolerably leaking (about 40MB/day) Twisted server: when the new code was pushed, the memory leak became catastrophic (about 100MB/hr). We could tolerate 40MB/day, but the new code needs to be debugged. First, I reverted to the old version, that is leaking 40MB/day (The leak rate is ac

Re: [Twisted-Python] Pulling the ethernet cable out

2010-02-16 Thread Alec Matusis
Assuming you are on Linux, you can run #man tcp and take a look at the tunable parameters that control TCP protocol timeouts: tcp_keepalive_intvl tcp_keepalive_probes tcp_keepalive_time They can be tuned via /proc filesystem. These changes are system-wide, so you should consider the performanc

[Twisted-Python] new epoll error after upgrading to 9.0.0

2010-02-11 Thread Alec Matusis
I upgraded to 9.0.0 and I am now seeing a new error, not present in 8.2.0 or earlier: 2010-02-10 17:38:33-0800 [TagProtocol,9794986,68.126.204.104] Unhandled Error Traceback (most recent call last): File "/usr/local/encap/python-2.6.4/lib/python2.6/site-packages/Twisted-9.0.0-py2

Re: [Twisted-Python] I found an interisting comment about Twisted vs. Erlang

2009-09-30 Thread Alec Matusis
>It became very painful once >we started getting CPU bound on 32 core CPU machines. We had to run multiple instances of our Twisted server implementation >to saturate the machine. I have since "ported" the same application to Erlang/OTP. It is about 1/5 the amount of code. >And it scales 1:1 horiz

Re: [Twisted-Python] I found an interisting comment about Twisted vs. Erlang

2009-09-29 Thread Alec Matusis
009 12:48 PM > To: Twisted general discussion > Subject: Re: [Twisted-Python] I found an interisting comment about > Twisted vs. Erlang > > Hi Alec, > > On Tue, Sep 29, 2009 at 12:36 PM, Alec Matusis > wrote: > > As you can see from the %CPU column, I have my reasons

[Twisted-Python] I found an interisting comment about Twisted vs. Erlang

2009-09-29 Thread Alec Matusis
PS. >From my experience, the hardest problem in running large-scale Twisted servers is finding memory leaks, and to a lesser extent debugging intermittent silent server crashes. It's not easy to attach a debugger to a production sever if you are looking for sources of intermittent crashes for exam

Re: [Twisted-Python] I found an interisting comment about Twisted vs. Erlang

2009-09-29 Thread Alec Matusis
> I think we are accounting way too much time to the unfounded > unaccountable random blathering of a troll :-) As you can see from the %CPU column, I have my reasons for concern ;) This is current copy and paste from a node with 2x quad core xeon L5420 @ 2.50GHz - 1 twistd process per core.

[Twisted-Python] I found an interisting comment about Twisted vs. Erlang

2009-09-29 Thread Alec Matusis
I have been a long time Twisted user, and I do not know Erlang. I run into this interesting comment in engineering notes on Facebook Chat scalability: http://www.facebook.com/note.php?note_id=51412338919&comments “Leif K-Brooks I'm curious whether you considered using the Python library Twisted (

Re: [Twisted-Python] memory leak on 8.2.0/2.6 versus 2.5/2.4

2009-09-15 Thread Alec Matusis
> Nothing springs to mind, unfortunately. What parts of Twisted does the > app use? Maybe narrowing the field a bit will help jog someone's > memory... Nothing special: Epoll reactor and twisted.enterprise.adbapi Will keep you guys posted. > -Original Message- > From: twisted-python-

[Twisted-Python] memory leak on 8.2.0/2.6 versus 2.5/2.4

2009-09-14 Thread Alec Matusis
I am running identical twisted servers under high load, one on 2.5.0 (patched for epoll bug) on python 2.4.4 and second one on 8.2.0 on python 2.6.2. The 8.2/2.6 one leaks memory compared to 2.5/2.4.4 to the point that I am about to roll back to older Twisted and then to older Python. Any insight

[Twisted-Python] misleading error in twisted.enterprise.adbapi

2009-08-28 Thread Alec Matusis
We are using twisted.enterprise.adbapi for connecting to MySQL. In one of our large tables, the primary key reached its maximum value of 2147483647, and INSERTs became impossible. When I executed the same INSERT from mysql command line manually, it gave: ERROR 1062 (23000): Duplicate entry '2147

Re: [Twisted-Python] installation error

2009-05-12 Thread Alec Matusis
Sorry never mind: I found that there’s a ticket for it, and downloaded a patch from: http://twistedmatrix.com/trac/attachment/ticket/3578/compile_error_avoid.pat ch From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] On Behalf Of Alec Matusis Sent

[Twisted-Python] installation error

2009-05-12 Thread Alec Matusis
Installing 8.2.0: creating /web20/encap/python-2.4.4/lib/python2.4/site-packages/Twisted-8.2.0-py2.4-li nux-x86_64.egg Extracting Twisted-8.2.0-py2.4-linux-x86_64.egg to /web20/encap/python-2.4.4/lib/python2.4/site-packages File "/web20/encap/python-2.4.4/lib/python2.4/site-packages/Twisted

RE: [Twisted-Python] RE: Question about Descriptors and SelectReactor

2009-04-08 Thread Alec Matusis
> Longer answer: Looks like maybe you want to contribute a patch for this > ticket :) > > http://twistedmatrix.com/trac/ticket/2234 I will look at this at some point (really swamped with work). But my question is: are you going to use python's select.epoll() that was introduced in python 2

RE: [Twisted-Python] RE: Question about Descriptors and SelectReactor

2009-04-07 Thread Alec Matusis
equ...@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

RE: [Twisted-Python] Question about Descriptors and SelectReactor

2009-04-06 Thread Alec Matusis
> 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

RE: [Twisted-Python] Question about Descriptors and SelectReactor

2009-04-06 Thread Alec Matusis
I think 1024 on most linux kernels (2.4 and 2.6) for select, you need to go to poll/epoll if you want more, or recompile your kernel. > -Original Message- > From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python- > boun...@twistedmatrix.com] On Behalf Of Drew Smathers > Sen

RE: [Twisted-Python] What kind of throughput can we expect to achieve when using DatagramProtocol (UDP)

2009-03-30 Thread Alec Matusis
One data point: I have a server that processes about 20 UDP multicast packets per second. This server does many other things, but the load from those 20 UDP pps is negligible- it uses 0% CPU with just that (Xeon L5420) > -Original Message- > From: twisted-python-boun...@twistedmatrix.com [

FW: [Twisted-Python] strange server crash

2009-03-24 Thread Alec Matusis
eved the system even log (SEL) list from the BMC controller, and are no errors whatsoever. This looks like a Python error or something very basic. It started happening after I slightly changed the code for this particular server. -Original Message- From: Alec Matusis [mailto:matu...@yahoo

RE: [Twisted-Python] strange server crash

2009-03-24 Thread Alec Matusis
This server crashed again today, again during maximum load for the day. This time, no errors in the twisted log, and not even a segfault message in /var/log/messages : the pid simply ceased to exist. Once again, this machine runs 8 twisted servers, but this one is slightly different from the othe

RE: [Twisted-Python] strange server crash

2009-03-23 Thread Alec Matusis
I have tested for bad RAM when the server was installed 3 month ago, I did a memtest that run for a day. This is an 8 core server, and I run one twistd process per core, and surprisingly, only one crashed out of 8. Would you think that the effect of bad RAM would be confined to just once server

RE: [Twisted-Python] strange server crash

2009-03-23 Thread Alec Matusis
y, March 22, 2009 8:10 AM > To: Twisted general discussion > Subject: Re: [Twisted-Python] strange server crash > > On Sun, Mar 22, 2009 at 10:32 AM, Itamar Shtull-Trauring > wrote: > > On Sat, 2009-03-21 at 20:02 -0700, Alec Matusis wrote: > > > >>

[Twisted-Python] strange server crash

2009-03-22 Thread Alec Matusis
I have been operating a busy twisted TCP server for quite some time (1 year+). Yesterday, it strangely crashed under peak load for that day (it has been under more load in the past). # grep segfault /var/log/messages Mar 20 19:12:15 serv2 kernel: [17687209.144548] twistd[10701]: segfault at

[Twisted-Python] most efficient new connection rate limiting?

2009-02-04 Thread Alec Matusis
We need to limit the new connection rate from a given IP, such that for example 10.10.1.10 cannot connect more often than 10 times per minute. This is a high-volume TCP Twisted server, with about 500 new distinct IP connections per second in the normal state (and we run 8 of these on each 8 core s