cherrypy lets you set onStopServer and onStopThread handlers that you
can use to close the database connections. Of course, doing kill -9
isn't going to give those a chance to be called... did you try killing
the process more gracefully? I've never had a problem with it
stopping...

Kevin

On 10/28/05, vinjvinj <[EMAIL PROTECTED]> wrote:
>
> I have a few (linux) machines which have cherrypy servers running? I do
> my development on windows. Currently I have a batch file using plink
> which does the following:
>
> 1. Kill -9 python
> 2. Uploads new code to the server
> 3. Restarts the server
>
> This is obviously not ideal but was easy to do. Now I'm getting some
> weird errors when I restart my server with the postgres connection.
> Esssentially the server is denied connection to the host and postgres
> log shows receiving an EOF from active connection.
>
> I have autoreload disabled and am looking for a way to terminate the
> python program from the command line and be able to catch it my python
> program so I can close all the valid db connections.
>
> vinjvinj
>
>


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to