Dan Price wrote: > Please take a look: > > http://cr.opensolaris.org/~dp/pkg-5756 > > This should help us have more reliable depot service restarts > in production by more aggressively killing off depots which are > (I think) pinned down by slow sippers.
There are actually two different cases for a delay on shutdown: 1) slow sipper 2) recently active (still open) connections to the cherrypy wsgi server First Case Example ================== 1) start a depot server (with a lot of packages preferably) 2) execute "wget -S -O /dev/null 'http://repo_origin_url/search/0/*'" 3) send a SIGINT or SIGKILL to the depot; it will wait until the wget finishes or until a socket_timeout error occurs (which will only happen if the client is having connection problems) Second Case Example =================== 1) start a depot server 2) start firefox (make sure you only have *one* instance running) 3) connect to depot using firefox 4) now send a SIGINT or SIGKILL the depot; it will wait for about 10 seconds and then close 5) close all firefox instances and then repeat steps #1-3 6) close firefox again (ensure no instances are running) 7) send a SIGINT or SIGKILL to the depot; it will stop immediately Conclusions =========== We need your changes for the first case. However, for the second case there are two things to note: 1) an outstanding RFE to cherrypy [1]. 2) if you add "server.shutdown_timeout": 0 to the gconf dict in depot.py just before server.socket_timeout, you'll get a nearly immediate shutdown if there are just idle connections. Now as for your code review: svc-pkg-depot: line 174: you need a line with a leading '#' to match the comment block style depot.py: you didn't change this, but if you add "server.shutdown_timeout": 0, to the gconf dict in depot.py, idle connection shutdowns will be much quicker Cheers, -- Shawn Walker [1] http://www.cherrypy.org/ticket/724 _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
