[Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread Hynek Schlawack
Hi, I have a really bad time with the combination of a low-volume service and adbapi.ConnectionPool, pyodbc, FreeTDS and Sybase. Basically my connections just time out and fail in weird, generic ways like: Error: ('01000', '[01000] [FreeTDS][SQL Server]Unexpected EOF from the server (20017) (

Re: [Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread Itamar Turner-Trauring
On Tue, Nov 27, 2012 at 4:16 AM, Hynek Schlawack wrote: > Hi, > > I have a really bad time with the combination of a low-volume service and > adbapi.ConnectionPool, pyodbc, FreeTDS and Sybase. > > Basically my connections just time out and fail in weird, generic ways > like: > > Error: ('01000',

Re: [Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread Hynek Schlawack
> I have a really bad time with the combination of a low-volume service and > adbapi.ConnectionPool, pyodbc, FreeTDS and Sybase. > > Basically my connections just time out and fail in weird, generic ways like: > > Error: ('01000', '[01000] [FreeTDS][SQL Server]Unexpected EOF from the server >

Re: [Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread exarkun
On 12:49 pm, h...@ox.cx wrote: > >The only reason I’d prefer to stay with pooling is that I very much >expect the traffic to rise and wouldn’t really want to change away and >go back later. :( Then I'd strongly recommend taking a look at twext.enterprise: http://trac.calendarserver.org/browser/

Re: [Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread Phil Mayers
On 27/11/12 12:49, Hynek Schlawack wrote: > Yep, and the connections *do* heal after dying. I don't have to restart > twistd, it just takes a few failed requests to warm up again. Yes - one attempt per thread in the pool. It is a pain. But as per recent discussions on the list, there's no conse

[Twisted-Python] spawnProcess and kill the child process.

2012-11-27 Thread holsety huang
hi, all I start a process using spawnProcess and want to kill when my certain Factory stops. something I wrote like these -- p = SomeProtocol(ProcessProtocol) reactor.spawnProcess(p, 'twistd', ['twistd', '-y', 'anotherMain.py'], {}) -- class Factory(ServerFactory): ... def

Re: [Twisted-Python] Making ConnectionPool not pool

2012-11-27 Thread Hynek Schlawack
Am 27.11.2012 um 14:39 schrieb exar...@twistedmatrix.com: >> The only reason I’d prefer to stay with pooling is that I very much >> expect the traffic to rise and wouldn’t really want to change away and >> go back later. :( > Then I'd strongly recommend taking a look at twext.enterprise: > > h

[Twisted-Python] spawnProcess and when to kill

2012-11-27 Thread 黄 轶明
hi, all I start a process using spawnProcess and want to kill when my certain Factory stops. something I wrote like these -- p = SomeProtocol(ProcessProtocol) reactor.spawnProcess(p, 'twistd', ['twistd', '-y', 'anotherMain.py'], {}) -- class Factory(ServerFactory): ...

Re: [Twisted-Python] spawnProcess and when to kill

2012-11-27 Thread exarkun
On 27 Nov, 01:59 pm, hoos...@gmail.com wrote: >hi, all > >I start a process using spawnProcess and want to kill when my certain >Factory stops. > >something I wrote like these Hi, Please don't double-post and please don't reply to another message when starting a new topic. Thanks. Jean-Pa

Re: [Twisted-Python] spawnProcess and when to kill

2012-11-27 Thread 黄 轶明
hi, JP I post the same question on stackoverflow, and my network has some problem yesterday, so I don't know if I send the email success or not. Please accept my pologize. 黄 轶明 mail: hoos...@gmail.com phone: 18620129285 在 2012-11-28,上午9:52,exar...@twistedmatrix.com 写道: > On 27 Nov, 01:59 p

Re: [Twisted-Python] spawnProcess and when to kill

2012-11-27 Thread Itamar Turner-Trauring
On Tue, Nov 27, 2012 at 8:59 AM, 黄 轶明 wrote: > > class Factory(ServerFactory): > ... > > def StopFactory(self): > # which is the p above > p.transport.signalProcess("KILL") > > I thought the subprocess will be killed which is not. > > > What's wrong with my code? Thanks! > Perhaps StopFactory