lunixbochs / uberserver

matchmaking/chat lobby server for the spring rts project
MIT License
8 stars 4 forks source link

uberserver opens to many mysql connections #14

Closed abma closed 11 years ago

abma commented 11 years ago

currently it has ~220 connections open... that should be reduced. at max 5 should be imo enough.

->website currently isn't working

lunixbochs commented 11 years ago

It really shouldn't. Might be a function of someone reloading the server far too much :) I'd recommend restarting it and getting mad at whoever reloads it most.

Ryan Hileman

On Saturday, December 1, 2012 at 6:07 PM, abma wrote:

currently it has ~220 connections open... that should be reduced. at max 5 should be imo enough. ->website currently isn't working

— Reply to this email directly or view it on GitHub (https://github.com/lunixbochs/uberserver/issues/14).

abma commented 11 years ago

"it" ?

the python process has ~220 connections open... restarting apache didn't change anything. also, i don't know how to restart the lobby server without fears of data-loss...

lunixbochs commented 11 years ago

it = uberserver. I should hope that was obvious from context :P

Ryan Hileman

On Saturday, December 1, 2012 at 6:14 PM, abma wrote:

"it" ? the python process has ~220 connections open... restarting apache didn't change anything.

— Reply to this email directly or view it on GitHub (https://github.com/lunixbochs/uberserver/issues/14#issuecomment-10925057).

abma commented 11 years ago

"it shouldn't" <- then wtf? it HAS ~220 connection open...

abma commented 11 years ago

oops, my grep was wrong. but it still has about 40 connections open to the mysql server ... sorry i'm tired :-/

lunixbochs commented 11 years ago

"Might be a function of someone reloading the server far too much" - the RELOAD command - something people have been using despite my recommendation "don't use this very much / ever without talking to me"

The sql class has a connection pool size of _root.max_threads * 2. max_threads defaults to 25. It's safe to reduce max_threads to 1 (cli flag --maxthreads, m) because we use event dispatching now instead of threads.

abma commented 11 years ago

oh, i suck today... you're right and meh.. then still the cause is unknown why the mysql server sucks. maybe the zero-k.info website is the cause...

sorry! and thanks for the quick response.