Ticket #9 (new defect)

Opened 5 years ago

Last modified 1 year ago

recursive browse leads to "Too many open files"

Reported by: dev Assigned to: dev
Priority: major Milestone: 1.0
Component: MediaServer Server Version:
Keywords: Cc:

Description

The recursive browsing of a ContentDirectory leads after a while to:
twisted.internet.error.ConnectBindError?: Couldn't bind: 24: Too many open files.

We need either find

  • a way to reuse the socket instead opening a new one for every action call, which might be possible with twisted.web2
  • an alternative to the recursive descent
  • or need to implement a pool of possible connects, if there are more deferred than slots in the pool, they have to queue up

Change History

05.10.2006 16:13:19 changed by dev

  • milestone changed from first public beta to 1.0.

The final solution is probably to use a twisted.web2.client, which implements (or should implement) a connection pool, and have that instantiated per service or maybe even better per device.

And route all SOAP- and XML-requests through that.

A devices webserver isn't probably capable of handling more than a few connections in parallel anyway.

05.10.2006 16:36:08 changed by dev

[16:16:12] <dev> but I still want to find out what is wrong with the current use of t.w.client

[16:17:03] <philippe.normand> i think the cleanup() method isn't called.. but digging throught 3 classes...

[16:18:49] <dev> so it is an error in twisted? and that normaly doesn't show up as the client isn't referenced not long enough and when it gets deleted, the socket is closed anyway?

[16:21:56] <philippe.normand> i don't know.. didn't investigated/tested it yet.. i was thinking about adding a "cleanup" callback on the tail of the one returned in callRemote()

05.10.2006 17:24:25 changed by dev

(In [19]) move SOAP request method back to service class, refs #9

24.11.2009 13:53:43 changed by jmsizun

  • component changed from ContentDirectory Client to MediaRenderer Server.

24.11.2009 13:58:18 changed by jmsizun

  • component changed from MediaRenderer Server to MediaServer Server.

06.02.2011 10:21:11 changed by sontek

I couldn't reproduce this, is it still a problem?