Hi, On 2015年05月31日 23:57, 曾惠萍 wrote: > Hi, > > sometime my program is normally work, but sometime it hang up. > when i get switch object, sometime it 's hangup and later it show error > message. > > *command:* > PYTHON=. ./bin/ryu-manager --observe-links ryu/app/address.py > > *my program as follow:* > @handler.set_ev_cls(event.EventLinkAdd) > def link_add_handler(self, ev): > link = ev.link > self.logger.info <http://self.logger.info>("link add: %s",link.to_dict()) > linkarray = link.to_dict() > > src_sw = api.get_switch(self, link.src.dpid)[0] > dst_sw = api.get_switch(self, link.dst.dpid)[0] > src_dp = src_sw.dp > dst_dp = dst_sw.dp > src_parser = src_sw.dp.ofproto_parser > dst_parser = dst_sw.dp.ofproto_parser > > *error message:* > hub: uncaught exception: Traceback (most recent call last): > File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in > _launch > File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", > line 70, in __call__ > self.server_loop() > File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", > line 96, in server_loop > server.serve_forever() > File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 120, in > serve_forever > File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 179, in > accept > File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 56, in > socket_accept > File "/usr/lib/python2.7/socket.py", line 202, in accept > error: [Errno 24] Too many open files
This message shows that the number of open files per process reached the limit, I think. Please check the limit of your system (eg. with "ulimit -n" command). Thanks, Iwase > > > > i think get_switch function is the point. > but i don't know how to correct it. > > Thanks, > Ping > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel